Toniolo and Linder, Equation (10+)

Percentage Accurate: 56.0% → 88.0%
Time: 17.9s
Alternatives: 28
Speedup: 1.9×

Specification

?
\[\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} \]
(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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 28 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 56.0% accurate, 1.0× speedup?

\[\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} \]
(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}

Alternative 1: 88.0% accurate, 0.5× speedup?

\[\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 1.4 \cdot 10^{-103}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 3.45 \cdot 10^{+102}:\\ \;\;\;\;t\_2 \cdot \left(\frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k} \cdot t\_2\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)}^{3}}\\ \end{array} \end{array} \end{array} \]
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 1.4e-103)
      (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
      (if (<= t_m 3.45e+102)
        (* t_2 (* (/ 2.0 (* (* (sin k) (pow t_m 3.0)) (tan k))) t_2))
        (/
         2.0
         (pow
          (*
           (* (cbrt (sin k)) (* t_m (pow (cbrt l) -2.0)))
           (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
          3.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = l / hypot(1.0, hypot(1.0, (k / t_m)));
	double tmp;
	if (t_m <= 1.4e-103) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 3.45e+102) {
		tmp = t_2 * ((2.0 / ((sin(k) * pow(t_m, 3.0)) * tan(k))) * t_2);
	} else {
		tmp = 2.0 / pow(((cbrt(sin(k)) * (t_m * pow(cbrt(l), -2.0))) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0))))), 3.0);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
	double tmp;
	if (t_m <= 1.4e-103) {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 3.45e+102) {
		tmp = t_2 * ((2.0 / ((Math.sin(k) * Math.pow(t_m, 3.0)) * 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))) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))))), 3.0);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m))))
	tmp = 0.0
	if (t_m <= 1.4e-103)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 3.45e+102)
		tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(Float64(sin(k) * (t_m ^ 3.0)) * tan(k))) * t_2));
	else
		tmp = Float64(2.0 / (Float64(Float64(cbrt(sin(k)) * Float64(t_m * (cbrt(l) ^ -2.0))) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))) ^ 3.0));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(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, 1.4e-103], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.45e+102], N[(t$95$2 * N[(N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(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] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \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 1.4 \cdot 10^{-103}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t\_m \leq 3.45 \cdot 10^{+102}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k} \cdot t\_2\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)}^{3}}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.40000000000000011e-103

    1. Initial program 49.7%

      \[\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)} \]
    2. Simplified49.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr11.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*11.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified11.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 30.2%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. associate-/l*30.3%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
    9. Simplified30.3%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]

    if 1.40000000000000011e-103 < t < 3.44999999999999983e102

    1. Initial program 69.2%

      \[\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)} \]
    2. Simplified68.1%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*68.6%

        \[\leadsto \frac{\color{blue}{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. add-sqr-sqrt68.5%

        \[\leadsto \frac{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}{\color{blue}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
      3. times-frac70.6%

        \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}} \cdot \frac{\ell}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
    5. Applied egg-rr79.2%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    6. Step-by-step derivation
      1. associate-/l*89.5%

        \[\leadsto \color{blue}{\left(\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. *-commutative89.5%

        \[\leadsto \left(\frac{2}{\color{blue}{\left(\sin k \cdot {t}^{3}\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified89.5%

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]

    if 3.44999999999999983e102 < t

    1. Initial program 53.8%

      \[\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)} \]
    2. Simplified53.8%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-cube-cbrt53.8%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right) \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow353.8%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. *-commutative53.8%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      4. cbrt-prod53.8%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. cbrt-div53.8%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \color{blue}{\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      6. rem-cbrt-cube68.7%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{\color{blue}{t}}{\sqrt[3]{\ell \cdot \ell}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      7. cbrt-prod90.1%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      8. pow290.1%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr90.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r/90.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    7. Applied egg-rr90.1%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    8. Step-by-step derivation
      1. div-inv90.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot \frac{1}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow-flip90.0%

        \[\leadsto \frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot \color{blue}{{\left(\sqrt[3]{\ell}\right)}^{\left(-2\right)}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. metadata-eval90.0%

        \[\leadsto \frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{\color{blue}{-2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    9. Applied egg-rr90.0%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    10. Step-by-step derivation
      1. add-cube-cbrt89.9%

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt[3]{{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \cdot \sqrt[3]{{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}\right) \cdot \sqrt[3]{{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}}} \]
      2. pow389.9%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}\right)}^{3}}} \]
    11. Applied egg-rr97.7%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\sqrt[3]{\sin k} \cdot \left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\right)}^{3}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.4 \cdot 10^{-103}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t \leq 3.45 \cdot 10^{+102}:\\ \;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot \left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 79.7% accurate, 0.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\ t_3 := \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_3 \leq 10^{+292}:\\ \;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)}{\ell}}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (pow (/ k t_m) 2.0))
        (t_3
         (*
          (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
          (+ 1.0 (+ 1.0 t_2)))))
   (*
    t_s
    (if (<= t_3 1e+292)
      (/ 2.0 (/ (* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l))) l))
      (if (<= t_3 INFINITY)
        (/
         2.0
         (pow
          (* k (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)))
          2.0))
        (/
         2.0
         (pow (* (* (/ k l) (sqrt t_m)) (sqrt (* (sin k) (tan k)))) 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = pow((k / t_m), 2.0);
	double t_3 = (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2));
	double tmp;
	if (t_3 <= 1e+292) {
		tmp = 2.0 / (((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))) / l);
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = 2.0 / pow((k * (hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l))), 2.0);
	} else {
		tmp = 2.0 / pow((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))), 2.0);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = Math.pow((k / t_m), 2.0);
	double t_3 = (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2));
	double tmp;
	if (t_3 <= 1e+292) {
		tmp = 2.0 / (((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))) / l);
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = 2.0 / Math.pow((k * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l))), 2.0);
	} else {
		tmp = 2.0 / Math.pow((((k / l) * Math.sqrt(t_m)) * Math.sqrt((Math.sin(k) * Math.tan(k)))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	t_2 = math.pow((k / t_m), 2.0)
	t_3 = (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2))
	tmp = 0
	if t_3 <= 1e+292:
		tmp = 2.0 / (((math.tan(k) * (2.0 + t_2)) * (math.sin(k) * (math.pow(t_m, 3.0) / l))) / l)
	elif t_3 <= math.inf:
		tmp = 2.0 / math.pow((k * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (math.pow(t_m, 1.5) / l))), 2.0)
	else:
		tmp = 2.0 / math.pow((((k / l) * math.sqrt(t_m)) * math.sqrt((math.sin(k) * math.tan(k)))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(k / t_m) ^ 2.0
	t_3 = Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(1.0 + t_2)))
	tmp = 0.0
	if (t_3 <= 1e+292)
		tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))) / l));
	elseif (t_3 <= Inf)
		tmp = Float64(2.0 / (Float64(k * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l))) ^ 2.0));
	else
		tmp = Float64(2.0 / (Float64(Float64(Float64(k / l) * sqrt(t_m)) * sqrt(Float64(sin(k) * tan(k)))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = (k / t_m) ^ 2.0;
	t_3 = (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * (1.0 + (1.0 + t_2));
	tmp = 0.0;
	if (t_3 <= 1e+292)
		tmp = 2.0 / (((tan(k) * (2.0 + t_2)) * (sin(k) * ((t_m ^ 3.0) / l))) / l);
	elseif (t_3 <= Inf)
		tmp = 2.0 / ((k * (hypot(1.0, hypot(1.0, (k / t_m))) * ((t_m ^ 1.5) / l))) ^ 2.0);
	else
		tmp = 2.0 / ((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 1e+292], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(2.0 / N[Power[N[(k * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 10^{+292}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)}{\ell}}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < 1e292

    1. Initial program 88.4%

      \[\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)} \]
    2. Simplified88.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l*78.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}} \]
      2. associate-/r*80.0%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)} \]
      3. associate-+r+80.0%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \color{blue}{\left(\left(1 + 1\right) + {\left(\frac{k}{t}\right)}^{2}\right)}\right)\right)} \]
      4. metadata-eval80.0%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(\color{blue}{2} + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. associate-*l*80.0%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
      6. associate-*l/82.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}{\ell}}} \]
      7. associate-*l*82.7%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell} \cdot \color{blue}{\left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}}{\ell}} \]
    5. Applied egg-rr82.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}{\ell}}} \]
    6. Step-by-step derivation
      1. associate-*r*93.8%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left(\frac{{t}^{3}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}{\ell}} \]
    7. Simplified93.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{\left(\frac{{t}^{3}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}{\ell}}} \]

    if 1e292 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0

    1. Initial program 63.9%

      \[\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)} \]
    2. Simplified63.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr45.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*45.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified45.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 63.7%

      \[\leadsto \frac{2}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \color{blue}{k}\right)}^{2}} \]

    if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))

    1. Initial program 0.0%

      \[\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)} \]
    2. Simplified0.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr15.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*15.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified15.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 32.8%

      \[\leadsto \frac{2}{{\left(\color{blue}{\left(\frac{k}{\ell} \cdot \sqrt{t}\right)} \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \leq 10^{+292}:\\ \;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell}\right)}{\ell}}\\ \mathbf{elif}\;\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \leq \infty:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \frac{{t}^{1.5}}{\ell}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 79.7% accurate, 0.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\ t_3 := \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_3 \leq 10^{+292}:\\ \;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)}{\ell}}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (pow (/ k t_m) 2.0))
        (t_3
         (*
          (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
          (+ 1.0 (+ 1.0 t_2)))))
   (*
    t_s
    (if (<= t_3 1e+292)
      (/ 2.0 (/ (* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l))) l))
      (if (<= t_3 INFINITY)
        (/
         2.0
         (pow
          (* k (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)))
          2.0))
        (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = pow((k / t_m), 2.0);
	double t_3 = (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2));
	double tmp;
	if (t_3 <= 1e+292) {
		tmp = 2.0 / (((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))) / l);
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = 2.0 / pow((k * (hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l))), 2.0);
	} else {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = Math.pow((k / t_m), 2.0);
	double t_3 = (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2));
	double tmp;
	if (t_3 <= 1e+292) {
		tmp = 2.0 / (((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))) / l);
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = 2.0 / Math.pow((k * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l))), 2.0);
	} else {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	t_2 = math.pow((k / t_m), 2.0)
	t_3 = (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2))
	tmp = 0
	if t_3 <= 1e+292:
		tmp = 2.0 / (((math.tan(k) * (2.0 + t_2)) * (math.sin(k) * (math.pow(t_m, 3.0) / l))) / l)
	elif t_3 <= math.inf:
		tmp = 2.0 / math.pow((k * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (math.pow(t_m, 1.5) / l))), 2.0)
	else:
		tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(k / t_m) ^ 2.0
	t_3 = Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(1.0 + t_2)))
	tmp = 0.0
	if (t_3 <= 1e+292)
		tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))) / l));
	elseif (t_3 <= Inf)
		tmp = Float64(2.0 / (Float64(k * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l))) ^ 2.0));
	else
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = (k / t_m) ^ 2.0;
	t_3 = (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * (1.0 + (1.0 + t_2));
	tmp = 0.0;
	if (t_3 <= 1e+292)
		tmp = 2.0 / (((tan(k) * (2.0 + t_2)) * (sin(k) * ((t_m ^ 3.0) / l))) / l);
	elseif (t_3 <= Inf)
		tmp = 2.0 / ((k * (hypot(1.0, hypot(1.0, (k / t_m))) * ((t_m ^ 1.5) / l))) ^ 2.0);
	else
		tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 1e+292], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(2.0 / N[Power[N[(k * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 10^{+292}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)}{\ell}}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < 1e292

    1. Initial program 88.4%

      \[\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)} \]
    2. Simplified88.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l*78.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}} \]
      2. associate-/r*80.0%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)} \]
      3. associate-+r+80.0%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \color{blue}{\left(\left(1 + 1\right) + {\left(\frac{k}{t}\right)}^{2}\right)}\right)\right)} \]
      4. metadata-eval80.0%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(\color{blue}{2} + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. associate-*l*80.0%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
      6. associate-*l/82.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}{\ell}}} \]
      7. associate-*l*82.7%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell} \cdot \color{blue}{\left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}}{\ell}} \]
    5. Applied egg-rr82.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}{\ell}}} \]
    6. Step-by-step derivation
      1. associate-*r*93.8%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left(\frac{{t}^{3}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}{\ell}} \]
    7. Simplified93.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{\left(\frac{{t}^{3}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}{\ell}}} \]

    if 1e292 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0

    1. Initial program 63.9%

      \[\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)} \]
    2. Simplified63.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr45.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*45.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified45.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 63.7%

      \[\leadsto \frac{2}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \color{blue}{k}\right)}^{2}} \]

    if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))

    1. Initial program 0.0%

      \[\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)} \]
    2. Simplified0.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr15.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*15.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified15.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 45.8%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. associate-/l*45.8%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
    9. Simplified45.8%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \leq 10^{+292}:\\ \;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell}\right)}{\ell}}\\ \mathbf{elif}\;\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \leq \infty:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \frac{{t}^{1.5}}{\ell}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 77.3% accurate, 0.4× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right)} \leq 2 \cdot 10^{+304}:\\ \;\;\;\;\frac{\frac{2}{\tan k \cdot \left(2 + t\_2\right)}}{\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (pow (/ k t_m) 2.0)))
   (*
    t_s
    (if (<=
         (/
          2.0
          (*
           (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
           (+ 1.0 (+ 1.0 t_2))))
         2e+304)
      (/
       (/ 2.0 (* (tan k) (+ 2.0 t_2)))
       (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)))
      (/
       2.0
       (pow (* (* (/ k l) (sqrt t_m)) (sqrt (* (sin k) (tan k)))) 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = pow((k / t_m), 2.0);
	double tmp;
	if ((2.0 / ((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)))) <= 2e+304) {
		tmp = (2.0 / (tan(k) * (2.0 + t_2))) / (sin(k) * pow((pow(t_m, 1.5) / l), 2.0));
	} else {
		tmp = 2.0 / pow((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))), 2.0);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: t_2
    real(8) :: tmp
    t_2 = (k / t_m) ** 2.0d0
    if ((2.0d0 / ((tan(k) * (sin(k) * ((t_m ** 3.0d0) / (l * l)))) * (1.0d0 + (1.0d0 + t_2)))) <= 2d+304) then
        tmp = (2.0d0 / (tan(k) * (2.0d0 + t_2))) / (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0))
    else
        tmp = 2.0d0 / ((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))) ** 2.0d0)
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = Math.pow((k / t_m), 2.0);
	double tmp;
	if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)))) <= 2e+304) {
		tmp = (2.0 / (Math.tan(k) * (2.0 + t_2))) / (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0));
	} else {
		tmp = 2.0 / Math.pow((((k / l) * Math.sqrt(t_m)) * Math.sqrt((Math.sin(k) * Math.tan(k)))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	t_2 = math.pow((k / t_m), 2.0)
	tmp = 0
	if (2.0 / ((math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)))) <= 2e+304:
		tmp = (2.0 / (math.tan(k) * (2.0 + t_2))) / (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))
	else:
		tmp = 2.0 / math.pow((((k / l) * math.sqrt(t_m)) * math.sqrt((math.sin(k) * math.tan(k)))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(k / t_m) ^ 2.0
	tmp = 0.0
	if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(1.0 + t_2)))) <= 2e+304)
		tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(2.0 + t_2))) / Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)));
	else
		tmp = Float64(2.0 / (Float64(Float64(Float64(k / l) * sqrt(t_m)) * sqrt(Float64(sin(k) * tan(k)))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = (k / t_m) ^ 2.0;
	tmp = 0.0;
	if ((2.0 / ((tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)))) <= 2e+304)
		tmp = (2.0 / (tan(k) * (2.0 + t_2))) / (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0));
	else
		tmp = 2.0 / ((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+304], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right)} \leq 2 \cdot 10^{+304}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(2 + t\_2\right)}}{\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 1.9999999999999999e304

    1. Initial program 82.6%

      \[\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)} \]
    2. Simplified82.6%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt28.6%

        \[\leadsto \frac{2}{\left(\color{blue}{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell}}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow228.6%

        \[\leadsto \frac{2}{\left(\color{blue}{{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}^{2}} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. sqrt-div28.5%

        \[\leadsto \frac{2}{\left({\color{blue}{\left(\frac{\sqrt{{t}^{3}}}{\sqrt{\ell \cdot \ell}}\right)}}^{2} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      4. sqrt-pow129.3%

        \[\leadsto \frac{2}{\left({\left(\frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. metadata-eval29.3%

        \[\leadsto \frac{2}{\left({\left(\frac{{t}^{\color{blue}{1.5}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      6. sqrt-prod13.0%

        \[\leadsto \frac{2}{\left({\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      7. add-sqr-sqrt31.4%

        \[\leadsto \frac{2}{\left({\left(\frac{{t}^{1.5}}{\color{blue}{\ell}}\right)}^{2} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr31.4%

      \[\leadsto \frac{2}{\left(\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. div-inv31.4%

        \[\leadsto \color{blue}{2 \cdot \frac{1}{\left({\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
      2. *-commutative31.4%

        \[\leadsto 2 \cdot \frac{1}{\color{blue}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right) \cdot \left({\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \sin k\right)}} \]
      3. associate-+r+31.4%

        \[\leadsto 2 \cdot \frac{1}{\left(\tan k \cdot \color{blue}{\left(\left(1 + 1\right) + {\left(\frac{k}{t}\right)}^{2}\right)}\right) \cdot \left({\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \sin k\right)} \]
      4. metadata-eval31.4%

        \[\leadsto 2 \cdot \frac{1}{\left(\tan k \cdot \left(\color{blue}{2} + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \left({\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \sin k\right)} \]
      5. *-commutative31.4%

        \[\leadsto 2 \cdot \frac{1}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \color{blue}{\left(\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}\right)}} \]
    7. Applied egg-rr31.4%

      \[\leadsto \color{blue}{2 \cdot \frac{1}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/31.4%

        \[\leadsto \color{blue}{\frac{2 \cdot 1}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}\right)}} \]
      2. metadata-eval31.4%

        \[\leadsto \frac{\color{blue}{2}}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}\right)} \]
      3. associate-/r*31.7%

        \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}}{\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}} \]
    9. Simplified31.7%

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}}{\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}} \]

    if 1.9999999999999999e304 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))))

    1. Initial program 22.2%

      \[\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)} \]
    2. Simplified22.2%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr35.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*35.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified35.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 48.5%

      \[\leadsto \frac{2}{{\left(\color{blue}{\left(\frac{k}{\ell} \cdot \sqrt{t}\right)} \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \leq 2 \cdot 10^{+304}:\\ \;\;\;\;\frac{\frac{2}{\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}}{\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 86.0% accurate, 0.6× speedup?

\[\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 1.4 \cdot 10^{-103}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 1.55 \cdot 10^{+92}:\\ \;\;\;\;t\_2 \cdot \left(\frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k} \cdot t\_2\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\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} \]
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 1.4e-103)
      (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
      (if (<= t_m 1.55e+92)
        (* t_2 (* (/ 2.0 (* (* (sin k) (pow t_m 3.0)) (tan k))) t_2))
        (/
         2.0
         (*
          (pow (/ (* t_m (cbrt (sin k))) (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 <= 1.4e-103) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 1.55e+92) {
		tmp = t_2 * ((2.0 / ((sin(k) * pow(t_m, 3.0)) * tan(k))) * t_2);
	} else {
		tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) / 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 <= 1.4e-103) {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 1.55e+92) {
		tmp = t_2 * ((2.0 / ((Math.sin(k) * Math.pow(t_m, 3.0)) * Math.tan(k))) * t_2);
	} 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) * (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 <= 1.4e-103)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 1.55e+92)
		tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(Float64(sin(k) * (t_m ^ 3.0)) * tan(k))) * t_2));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) / (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, 1.4e-103], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.55e+92], N[(t$95$2 * N[(N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $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[(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 1.4 \cdot 10^{-103}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t\_m \leq 1.55 \cdot 10^{+92}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k} \cdot t\_2\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\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}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.40000000000000011e-103

    1. Initial program 49.7%

      \[\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)} \]
    2. Simplified49.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr11.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*11.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified11.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 30.2%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. associate-/l*30.3%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
    9. Simplified30.3%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]

    if 1.40000000000000011e-103 < t < 1.5500000000000001e92

    1. Initial program 67.8%

      \[\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)} \]
    2. Simplified66.7%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*67.2%

        \[\leadsto \frac{\color{blue}{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. add-sqr-sqrt67.1%

        \[\leadsto \frac{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}{\color{blue}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
      3. times-frac69.3%

        \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}} \cdot \frac{\ell}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
    5. Applied egg-rr78.3%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    6. Step-by-step derivation
      1. associate-/l*89.1%

        \[\leadsto \color{blue}{\left(\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. *-commutative89.1%

        \[\leadsto \left(\frac{2}{\color{blue}{\left(\sin k \cdot {t}^{3}\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified89.1%

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]

    if 1.5500000000000001e92 < t

    1. Initial program 56.3%

      \[\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)} \]
    2. Simplified56.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-cube-cbrt56.2%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right) \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow356.2%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. *-commutative56.2%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      4. cbrt-prod56.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. cbrt-div56.2%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \color{blue}{\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      6. rem-cbrt-cube70.3%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{\color{blue}{t}}{\sqrt[3]{\ell \cdot \ell}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      7. cbrt-prod90.5%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      8. pow290.5%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr90.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r/90.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    7. Applied egg-rr90.6%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification49.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.4 \cdot 10^{-103}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+92}:\\ \;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 82.9% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 10^{-48}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\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} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1e-48)
    (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
    (/
     2.0
     (*
      (pow (/ (* t_m (cbrt (sin k))) (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 <= 1e-48) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else {
		tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) / 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 <= 1e-48) {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} 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) * (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 <= 1e-48)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) / (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, 1e-48], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $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[(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 10^{-48}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\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}
Derivation
  1. Split input into 2 regimes
  2. if t < 9.9999999999999997e-49

    1. Initial program 49.2%

      \[\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)} \]
    2. Simplified49.2%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr15.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*15.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified15.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 33.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. associate-/l*33.5%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
    9. Simplified33.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]

    if 9.9999999999999997e-49 < t

    1. Initial program 67.1%

      \[\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)} \]
    2. Simplified67.1%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-cube-cbrt66.8%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right) \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow366.8%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. *-commutative66.8%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      4. cbrt-prod66.7%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. cbrt-div66.6%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \color{blue}{\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      6. rem-cbrt-cube74.7%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{\color{blue}{t}}{\sqrt[3]{\ell \cdot \ell}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      7. cbrt-prod87.5%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      8. pow287.5%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr87.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r/87.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    7. Applied egg-rr87.6%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 10^{-48}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 82.9% accurate, 0.6× speedup?

\[\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^{-48}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\ \end{array} \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
 (*
  t_s
  (if (<= t_m 2.4e-48)
    (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
    (/
     2.0
     (*
      (* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
      (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.4e-48) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else {
		tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.4e-48) {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else {
		tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 2.4e-48)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * (Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.4e-48], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(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] * 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]), $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^{-48}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.4e-48

    1. Initial program 49.2%

      \[\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)} \]
    2. Simplified49.2%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr15.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*15.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified15.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 33.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. associate-/l*33.5%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
    9. Simplified33.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]

    if 2.4e-48 < t

    1. Initial program 67.1%

      \[\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)} \]
    2. Simplified67.1%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-cube-cbrt66.8%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right) \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow366.8%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. *-commutative66.8%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      4. cbrt-prod66.7%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. cbrt-div66.6%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \color{blue}{\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      6. rem-cbrt-cube74.7%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{\color{blue}{t}}{\sqrt[3]{\ell \cdot \ell}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      7. cbrt-prod87.5%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      8. pow287.5%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr87.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.4 \cdot 10^{-48}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 80.8% accurate, 0.7× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 6.2 \cdot 10^{-48}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 3.7 \cdot 10^{+99}:\\ \;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + t\_2\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}\right)}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (pow (/ k t_m) 2.0)))
   (*
    t_s
    (if (<= t_m 6.2e-48)
      (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
      (if (<= t_m 3.7e+99)
        (/
         2.0
         (*
          (/ 1.0 l)
          (* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l)))))
        (/
         2.0
         (*
          (* (tan k) (+ 1.0 (+ 1.0 t_2)))
          (* (sin k) (pow (/ t_m (pow (cbrt l) 2.0)) 3.0)))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 6.2e-48) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 3.7e+99) {
		tmp = 2.0 / ((1.0 / l) * ((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))));
	} else {
		tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + t_2))) * (sin(k) * pow((t_m / pow(cbrt(l), 2.0)), 3.0)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = Math.pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 6.2e-48) {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 3.7e+99) {
		tmp = 2.0 / ((1.0 / l) * ((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))));
	} else {
		tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + t_2))) * (Math.sin(k) * Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(k / t_m) ^ 2.0
	tmp = 0.0
	if (t_m <= 6.2e-48)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 3.7e+99)
		tmp = Float64(2.0 / Float64(Float64(1.0 / l) * Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l)))));
	else
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + t_2))) * Float64(sin(k) * (Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 6.2e-48], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.7e+99], N[(2.0 / N[(N[(1.0 / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t\_m \leq 3.7 \cdot 10^{+99}:\\
\;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + t\_2\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}\right)}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 6.20000000000000033e-48

    1. Initial program 49.0%

      \[\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)} \]
    2. Simplified49.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr15.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*15.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified15.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 33.3%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. associate-/l*33.3%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
    9. Simplified33.3%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]

    if 6.20000000000000033e-48 < t < 3.7000000000000001e99

    1. Initial program 84.6%

      \[\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)} \]
    2. Simplified84.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l*83.2%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}} \]
      2. associate-/r*83.3%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)} \]
      3. associate-+r+83.3%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \color{blue}{\left(\left(1 + 1\right) + {\left(\frac{k}{t}\right)}^{2}\right)}\right)\right)} \]
      4. metadata-eval83.3%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(\color{blue}{2} + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. associate-*l*83.4%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
      6. associate-*l/86.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}{\ell}}} \]
      7. clear-num86.5%

        \[\leadsto \frac{2}{\color{blue}{\frac{1}{\frac{\ell}{\frac{{t}^{3}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}}} \]
      8. associate-*l*86.6%

        \[\leadsto \frac{2}{\frac{1}{\frac{\ell}{\frac{{t}^{3}}{\ell} \cdot \color{blue}{\left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}}}} \]
    5. Applied egg-rr86.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{1}{\frac{\ell}{\frac{{t}^{3}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}}}} \]
    6. Step-by-step derivation
      1. associate-/r/86.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{1}{\ell} \cdot \left(\frac{{t}^{3}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}} \]
      2. associate-*r*88.1%

        \[\leadsto \frac{2}{\frac{1}{\ell} \cdot \color{blue}{\left(\left(\frac{{t}^{3}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    7. Simplified88.1%

      \[\leadsto \frac{2}{\color{blue}{\frac{1}{\ell} \cdot \left(\left(\frac{{t}^{3}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]

    if 3.7000000000000001e99 < t

    1. Initial program 53.8%

      \[\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)} \]
    2. Simplified53.8%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-cube-cbrt53.8%

        \[\leadsto \frac{2}{\left(\color{blue}{\left(\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell}}\right) \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell}}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow353.8%

        \[\leadsto \frac{2}{\left(\color{blue}{{\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}^{3}} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. cbrt-div53.8%

        \[\leadsto \frac{2}{\left({\color{blue}{\left(\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{\ell \cdot \ell}}\right)}}^{3} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      4. rem-cbrt-cube66.1%

        \[\leadsto \frac{2}{\left({\left(\frac{\color{blue}{t}}{\sqrt[3]{\ell \cdot \ell}}\right)}^{3} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. cbrt-prod79.4%

        \[\leadsto \frac{2}{\left({\left(\frac{t}{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)}^{3} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      6. pow279.5%

        \[\leadsto \frac{2}{\left({\left(\frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}^{3} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr79.5%

      \[\leadsto \frac{2}{\left(\color{blue}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 6.2 \cdot 10^{-48}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{+99}:\\ \;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(\left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 80.8% accurate, 0.7× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-48}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 1.85 \cdot 10^{+102}:\\ \;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(t\_2 \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\sin k \cdot \left(t\_2 \cdot {\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\ \end{array} \end{array} \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 (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
   (*
    t_s
    (if (<= t_m 5.5e-48)
      (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
      (if (<= t_m 1.85e+102)
        (/ 2.0 (* (/ 1.0 l) (* t_2 (* (sin k) (/ (pow t_m 3.0) l)))))
        (/ 2.0 (* (sin k) (* t_2 (pow (* t_m (pow (cbrt l) -2.0)) 3.0)))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = tan(k) * (2.0 + pow((k / t_m), 2.0));
	double tmp;
	if (t_m <= 5.5e-48) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 1.85e+102) {
		tmp = 2.0 / ((1.0 / l) * (t_2 * (sin(k) * (pow(t_m, 3.0) / l))));
	} else {
		tmp = 2.0 / (sin(k) * (t_2 * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0));
	double tmp;
	if (t_m <= 5.5e-48) {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 1.85e+102) {
		tmp = 2.0 / ((1.0 / l) * (t_2 * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))));
	} else {
		tmp = 2.0 / (Math.sin(k) * (t_2 * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))
	tmp = 0.0
	if (t_m <= 5.5e-48)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 1.85e+102)
		tmp = Float64(2.0 / Float64(Float64(1.0 / l) * Float64(t_2 * Float64(sin(k) * Float64((t_m ^ 3.0) / l)))));
	else
		tmp = Float64(2.0 / Float64(sin(k) * Float64(t_2 * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.5e-48], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.85e+102], N[(2.0 / N[(N[(1.0 / l), $MachinePrecision] * N[(t$95$2 * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(t$95$2 * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.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 := \tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-48}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t\_m \leq 1.85 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(t\_2 \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(t\_2 \cdot {\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 5.50000000000000047e-48

    1. Initial program 49.0%

      \[\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)} \]
    2. Simplified49.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr15.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*15.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified15.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 33.3%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. associate-/l*33.3%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
    9. Simplified33.3%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]

    if 5.50000000000000047e-48 < t < 1.85000000000000011e102

    1. Initial program 84.6%

      \[\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)} \]
    2. Simplified84.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l*83.2%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}} \]
      2. associate-/r*83.3%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)} \]
      3. associate-+r+83.3%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \color{blue}{\left(\left(1 + 1\right) + {\left(\frac{k}{t}\right)}^{2}\right)}\right)\right)} \]
      4. metadata-eval83.3%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(\color{blue}{2} + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. associate-*l*83.4%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
      6. associate-*l/86.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}{\ell}}} \]
      7. clear-num86.5%

        \[\leadsto \frac{2}{\color{blue}{\frac{1}{\frac{\ell}{\frac{{t}^{3}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}}} \]
      8. associate-*l*86.6%

        \[\leadsto \frac{2}{\frac{1}{\frac{\ell}{\frac{{t}^{3}}{\ell} \cdot \color{blue}{\left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}}}} \]
    5. Applied egg-rr86.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{1}{\frac{\ell}{\frac{{t}^{3}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}}}} \]
    6. Step-by-step derivation
      1. associate-/r/86.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{1}{\ell} \cdot \left(\frac{{t}^{3}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}} \]
      2. associate-*r*88.1%

        \[\leadsto \frac{2}{\frac{1}{\ell} \cdot \color{blue}{\left(\left(\frac{{t}^{3}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    7. Simplified88.1%

      \[\leadsto \frac{2}{\color{blue}{\frac{1}{\ell} \cdot \left(\left(\frac{{t}^{3}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]

    if 1.85000000000000011e102 < t

    1. Initial program 53.8%

      \[\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)} \]
    2. Simplified53.8%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-cube-cbrt53.8%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right) \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow353.8%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. *-commutative53.8%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      4. cbrt-prod53.8%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. cbrt-div53.8%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \color{blue}{\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      6. rem-cbrt-cube68.7%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{\color{blue}{t}}{\sqrt[3]{\ell \cdot \ell}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      7. cbrt-prod90.1%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      8. pow290.1%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr90.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r/90.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    7. Applied egg-rr90.1%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    8. Step-by-step derivation
      1. div-inv90.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot \frac{1}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow-flip90.0%

        \[\leadsto \frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot \color{blue}{{\left(\sqrt[3]{\ell}\right)}^{\left(-2\right)}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. metadata-eval90.0%

        \[\leadsto \frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{\color{blue}{-2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    9. Applied egg-rr90.0%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    10. Step-by-step derivation
      1. pow190.0%

        \[\leadsto \frac{2}{\color{blue}{{\left({\left(\left(\sqrt[3]{\sin k} \cdot t\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}^{1}}} \]
      2. associate-*l*90.0%

        \[\leadsto \frac{2}{{\left({\color{blue}{\left(\sqrt[3]{\sin k} \cdot \left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}^{1}} \]
      3. unpow-prod-down79.4%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left({\left(\sqrt[3]{\sin k}\right)}^{3} \cdot {\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}^{1}} \]
      4. pow379.4%

        \[\leadsto \frac{2}{{\left(\left(\color{blue}{\left(\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\sin k}\right)} \cdot {\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}^{1}} \]
      5. add-cube-cbrt79.4%

        \[\leadsto \frac{2}{{\left(\left(\color{blue}{\sin k} \cdot {\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}^{1}} \]
      6. associate-+r+79.4%

        \[\leadsto \frac{2}{{\left(\left(\sin k \cdot {\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right) \cdot \left(\tan k \cdot \color{blue}{\left(\left(1 + 1\right) + {\left(\frac{k}{t}\right)}^{2}\right)}\right)\right)}^{1}} \]
      7. metadata-eval79.4%

        \[\leadsto \frac{2}{{\left(\left(\sin k \cdot {\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right) \cdot \left(\tan k \cdot \left(\color{blue}{2} + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}^{1}} \]
    11. Applied egg-rr79.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\sin k \cdot {\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow179.4%

        \[\leadsto \frac{2}{\color{blue}{\left(\sin k \cdot {\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
      2. associate-*l*79.4%

        \[\leadsto \frac{2}{\color{blue}{\sin k \cdot \left({\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    13. Simplified79.4%

      \[\leadsto \frac{2}{\color{blue}{\sin k \cdot \left({\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.5 \cdot 10^{-48}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+102}:\\ \;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(\left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\sin k \cdot \left(\left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot {\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 76.2% accurate, 1.0× speedup?

\[\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^{-16}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 2.2 \cdot 10^{+82}:\\ \;\;\;\;\frac{2 \cdot \ell}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\ \end{array} \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
 (*
  t_s
  (if (<= t_m 5.5e-16)
    (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 2.2e+82)
      (*
       (/ (* 2.0 l) (* (pow t_m 3.0) (* (sin k) (tan k))))
       (/ l (+ 2.0 (pow (/ k t_m) 2.0))))
      (/
       2.0
       (pow
        (* k (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)))
        2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 5.5e-16) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 2.2e+82) {
		tmp = ((2.0 * l) / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * (l / (2.0 + pow((k / t_m), 2.0)));
	} else {
		tmp = 2.0 / pow((k * (hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / 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 (t_m <= 5.5e-16) {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 2.2e+82) {
		tmp = ((2.0 * l) / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
	} else {
		tmp = 2.0 / Math.pow((k * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 5.5e-16:
		tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0)
	elif t_m <= 2.2e+82:
		tmp = ((2.0 * l) / (math.pow(t_m, 3.0) * (math.sin(k) * math.tan(k)))) * (l / (2.0 + math.pow((k / t_m), 2.0)))
	else:
		tmp = 2.0 / math.pow((k * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (math.pow(t_m, 1.5) / l))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 5.5e-16)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 2.2e+82)
		tmp = Float64(Float64(Float64(2.0 * l) / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))));
	else
		tmp = Float64(2.0 / (Float64(k * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 5.5e-16)
		tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0);
	elseif (t_m <= 2.2e+82)
		tmp = ((2.0 * l) / ((t_m ^ 3.0) * (sin(k) * tan(k)))) * (l / (2.0 + ((k / t_m) ^ 2.0)));
	else
		tmp = 2.0 / ((k * (hypot(1.0, hypot(1.0, (k / t_m))) * ((t_m ^ 1.5) / l))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.5e-16], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.2e+82], N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(k * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t\_m \leq 2.2 \cdot 10^{+82}:\\
\;\;\;\;\frac{2 \cdot \ell}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 5.49999999999999964e-16

    1. Initial program 50.5%

      \[\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)} \]
    2. Simplified50.5%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr18.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*18.3%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified18.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 35.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. associate-/l*35.5%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
    9. Simplified35.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]

    if 5.49999999999999964e-16 < t < 2.2000000000000001e82

    1. Initial program 89.0%

      \[\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)} \]
    2. Simplified89.0%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*88.9%

        \[\leadsto \frac{\color{blue}{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. *-un-lft-identity88.9%

        \[\leadsto \frac{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}{\color{blue}{1 \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}} \]
      3. times-frac94.4%

        \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
      4. associate-*r*94.6%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr94.6%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    6. Step-by-step derivation
      1. /-rgt-identity94.6%

        \[\leadsto \color{blue}{\left(\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. associate-*l/94.5%

        \[\leadsto \color{blue}{\frac{2 \cdot \ell}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. associate-*l*94.3%

        \[\leadsto \frac{2 \cdot \ell}{\color{blue}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified94.3%

      \[\leadsto \color{blue}{\frac{2 \cdot \ell}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]

    if 2.2000000000000001e82 < t

    1. Initial program 54.5%

      \[\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)} \]
    2. Simplified54.5%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr36.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*36.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified36.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 70.3%

      \[\leadsto \frac{2}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \color{blue}{k}\right)}^{2}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.5 \cdot 10^{-16}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+82}:\\ \;\;\;\;\frac{2 \cdot \ell}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \frac{{t}^{1.5}}{\ell}\right)\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 74.9% accurate, 1.0× speedup?

\[\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 3900000000:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left(t\_m \cdot \frac{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}{\cos k \cdot {\ell}^{2}}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 3900000000.0)
    (/
     2.0
     (pow (* k (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l))) 2.0))
    (/
     2.0
     (*
      (pow k 2.0)
      (* t_m (/ (- 0.5 (/ (cos (* 2.0 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 <= 3900000000.0) {
		tmp = 2.0 / pow((k * (hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l))), 2.0);
	} else {
		tmp = 2.0 / (pow(k, 2.0) * (t_m * ((0.5 - (cos((2.0 * 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 <= 3900000000.0) {
		tmp = 2.0 / Math.pow((k * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l))), 2.0);
	} else {
		tmp = 2.0 / (Math.pow(k, 2.0) * (t_m * ((0.5 - (Math.cos((2.0 * k)) / 2.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 <= 3900000000.0:
		tmp = 2.0 / math.pow((k * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (math.pow(t_m, 1.5) / l))), 2.0)
	else:
		tmp = 2.0 / (math.pow(k, 2.0) * (t_m * ((0.5 - (math.cos((2.0 * 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 <= 3900000000.0)
		tmp = Float64(2.0 / (Float64(k * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64(t_m * Float64(Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.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 <= 3900000000.0)
		tmp = 2.0 / ((k * (hypot(1.0, hypot(1.0, (k / t_m))) * ((t_m ^ 1.5) / l))) ^ 2.0);
	else
		tmp = 2.0 / ((k ^ 2.0) * (t_m * ((0.5 - (cos((2.0 * k)) / 2.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, 3900000000.0], N[(2.0 / N[Power[N[(k * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 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}\;k \leq 3900000000:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left(t\_m \cdot \frac{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}{\cos k \cdot {\ell}^{2}}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 3.9e9

    1. Initial program 57.9%

      \[\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)} \]
    2. Simplified57.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr29.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*29.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified29.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 32.0%

      \[\leadsto \frac{2}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \color{blue}{k}\right)}^{2}} \]

    if 3.9e9 < k

    1. Initial program 40.4%

      \[\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)} \]
    2. Simplified40.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*65.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*65.3%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified65.3%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Step-by-step derivation
      1. unpow265.3%

        \[\leadsto \frac{2}{{k}^{2} \cdot \left(t \cdot \frac{\color{blue}{\sin k \cdot \sin k}}{{\ell}^{2} \cdot \cos k}\right)} \]
      2. sin-mult65.2%

        \[\leadsto \frac{2}{{k}^{2} \cdot \left(t \cdot \frac{\color{blue}{\frac{\cos \left(k - k\right) - \cos \left(k + k\right)}{2}}}{{\ell}^{2} \cdot \cos k}\right)} \]
    8. Applied egg-rr65.2%

      \[\leadsto \frac{2}{{k}^{2} \cdot \left(t \cdot \frac{\color{blue}{\frac{\cos \left(k - k\right) - \cos \left(k + k\right)}{2}}}{{\ell}^{2} \cdot \cos k}\right)} \]
    9. Step-by-step derivation
      1. div-sub65.2%

        \[\leadsto \frac{2}{{k}^{2} \cdot \left(t \cdot \frac{\color{blue}{\frac{\cos \left(k - k\right)}{2} - \frac{\cos \left(k + k\right)}{2}}}{{\ell}^{2} \cdot \cos k}\right)} \]
      2. +-inverses65.2%

        \[\leadsto \frac{2}{{k}^{2} \cdot \left(t \cdot \frac{\frac{\cos \color{blue}{0}}{2} - \frac{\cos \left(k + k\right)}{2}}{{\ell}^{2} \cdot \cos k}\right)} \]
      3. cos-065.2%

        \[\leadsto \frac{2}{{k}^{2} \cdot \left(t \cdot \frac{\frac{\color{blue}{1}}{2} - \frac{\cos \left(k + k\right)}{2}}{{\ell}^{2} \cdot \cos k}\right)} \]
      4. metadata-eval65.2%

        \[\leadsto \frac{2}{{k}^{2} \cdot \left(t \cdot \frac{\color{blue}{0.5} - \frac{\cos \left(k + k\right)}{2}}{{\ell}^{2} \cdot \cos k}\right)} \]
      5. count-265.2%

        \[\leadsto \frac{2}{{k}^{2} \cdot \left(t \cdot \frac{0.5 - \frac{\cos \color{blue}{\left(2 \cdot k\right)}}{2}}{{\ell}^{2} \cdot \cos k}\right)} \]
    10. Simplified65.2%

      \[\leadsto \frac{2}{{k}^{2} \cdot \left(t \cdot \frac{\color{blue}{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}}{{\ell}^{2} \cdot \cos k}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3900000000:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \frac{{t}^{1.5}}{\ell}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left(t \cdot \frac{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}{\cos k \cdot {\ell}^{2}}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 71.1% accurate, 1.0× speedup?

\[\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.6 \cdot 10^{-47}:\\ \;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\ \mathbf{elif}\;k \leq 8.4 \cdot 10^{+80}:\\ \;\;\;\;\left(\ell \cdot \frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k}\right) \cdot \left(\ell \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(t\_m \cdot \sqrt[3]{{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}^{2}}\right)}^{3}}\\ \end{array} \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
 (*
  t_s
  (if (<= k 2.6e-47)
    (* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0))
    (if (<= k 8.4e+80)
      (* (* l (/ 2.0 (* (* (sin k) (pow t_m 3.0)) (tan k)))) (* l 0.5))
      (/ 2.0 (pow (* t_m (cbrt (pow (* k (/ (sqrt 2.0) 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 <= 2.6e-47) {
		tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
	} else if (k <= 8.4e+80) {
		tmp = (l * (2.0 / ((sin(k) * pow(t_m, 3.0)) * tan(k)))) * (l * 0.5);
	} else {
		tmp = 2.0 / pow((t_m * cbrt(pow((k * (sqrt(2.0) / 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 <= 2.6e-47) {
		tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
	} else if (k <= 8.4e+80) {
		tmp = (l * (2.0 / ((Math.sin(k) * Math.pow(t_m, 3.0)) * Math.tan(k)))) * (l * 0.5);
	} else {
		tmp = 2.0 / Math.pow((t_m * Math.cbrt(Math.pow((k * (Math.sqrt(2.0) / 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 <= 2.6e-47)
		tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0));
	elseif (k <= 8.4e+80)
		tmp = Float64(Float64(l * Float64(2.0 / Float64(Float64(sin(k) * (t_m ^ 3.0)) * tan(k)))) * Float64(l * 0.5));
	else
		tmp = Float64(2.0 / (Float64(t_m * cbrt((Float64(k * Float64(sqrt(2.0) / 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, 2.6e-47], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.4e+80], N[(N[(l * N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[Power[N[Power[N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.6 \cdot 10^{-47}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\

\mathbf{elif}\;k \leq 8.4 \cdot 10^{+80}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k}\right) \cdot \left(\ell \cdot 0.5\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \sqrt[3]{{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}^{2}}\right)}^{3}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 2.6e-47

    1. Initial program 56.0%

      \[\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)} \]
    2. Simplified56.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr28.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*28.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified28.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 27.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t}^{3}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. *-commutative27.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}}^{2}} \]
      2. associate-/l*27.5%

        \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
    9. Simplified27.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}}^{2}} \]
    10. Step-by-step derivation
      1. div-inv27.5%

        \[\leadsto \color{blue}{2 \cdot \frac{1}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}} \]
      2. pow-flip27.8%

        \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)}} \]
      3. sqrt-pow130.8%

        \[\leadsto 2 \cdot {\left(\color{blue}{{t}^{\left(\frac{3}{2}\right)}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      4. metadata-eval30.8%

        \[\leadsto 2 \cdot {\left({t}^{\color{blue}{1.5}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      5. associate-*r/30.8%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \color{blue}{\frac{k \cdot \sqrt{2}}{\ell}}\right)}^{\left(-2\right)} \]
      6. metadata-eval30.8%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{\color{blue}{-2}} \]
    11. Applied egg-rr30.8%

      \[\leadsto \color{blue}{2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}} \]

    if 2.6e-47 < k < 8.40000000000000005e80

    1. Initial program 60.1%

      \[\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)} \]
    2. Simplified60.2%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*63.8%

        \[\leadsto \frac{\color{blue}{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. *-un-lft-identity63.8%

        \[\leadsto \frac{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}{\color{blue}{1 \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}} \]
      3. times-frac63.8%

        \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
      4. associate-*r*63.7%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr63.7%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    6. Taylor expanded in k around 0 71.2%

      \[\leadsto \frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \color{blue}{\left(0.5 \cdot \ell\right)} \]
    7. Step-by-step derivation
      1. *-commutative71.2%

        \[\leadsto \frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \color{blue}{\left(\ell \cdot 0.5\right)} \]
    8. Simplified71.2%

      \[\leadsto \frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \color{blue}{\left(\ell \cdot 0.5\right)} \]

    if 8.40000000000000005e80 < k

    1. Initial program 40.0%

      \[\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)} \]
    2. Simplified39.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr11.9%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*12.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified12.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 24.1%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t}^{3}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. *-commutative24.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}}^{2}} \]
      2. associate-/l*24.1%

        \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
    9. Simplified24.1%

      \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}}^{2}} \]
    10. Step-by-step derivation
      1. add-cube-cbrt24.1%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{2}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}} \cdot \sqrt[3]{\frac{2}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}}\right) \cdot \sqrt[3]{\frac{2}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}}} \]
    11. Applied egg-rr56.5%

      \[\leadsto \color{blue}{{\left(\frac{\sqrt[3]{2}}{t \cdot \sqrt[3]{{\left(\frac{k \cdot \sqrt{2}}{\ell}\right)}^{2}}}\right)}^{2} \cdot \frac{\sqrt[3]{2}}{t \cdot \sqrt[3]{{\left(\frac{k \cdot \sqrt{2}}{\ell}\right)}^{2}}}} \]
    12. Step-by-step derivation
      1. unpow256.5%

        \[\leadsto \color{blue}{\left(\frac{\sqrt[3]{2}}{t \cdot \sqrt[3]{{\left(\frac{k \cdot \sqrt{2}}{\ell}\right)}^{2}}} \cdot \frac{\sqrt[3]{2}}{t \cdot \sqrt[3]{{\left(\frac{k \cdot \sqrt{2}}{\ell}\right)}^{2}}}\right)} \cdot \frac{\sqrt[3]{2}}{t \cdot \sqrt[3]{{\left(\frac{k \cdot \sqrt{2}}{\ell}\right)}^{2}}} \]
      2. unpow356.5%

        \[\leadsto \color{blue}{{\left(\frac{\sqrt[3]{2}}{t \cdot \sqrt[3]{{\left(\frac{k \cdot \sqrt{2}}{\ell}\right)}^{2}}}\right)}^{3}} \]
      3. cube-div56.5%

        \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{2}\right)}^{3}}{{\left(t \cdot \sqrt[3]{{\left(\frac{k \cdot \sqrt{2}}{\ell}\right)}^{2}}\right)}^{3}}} \]
      4. rem-cube-cbrt56.5%

        \[\leadsto \frac{\color{blue}{2}}{{\left(t \cdot \sqrt[3]{{\left(\frac{k \cdot \sqrt{2}}{\ell}\right)}^{2}}\right)}^{3}} \]
      5. associate-/l*56.5%

        \[\leadsto \frac{2}{{\left(t \cdot \sqrt[3]{{\color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}}^{2}}\right)}^{3}} \]
    13. Simplified56.5%

      \[\leadsto \color{blue}{\frac{2}{{\left(t \cdot \sqrt[3]{{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}^{2}}\right)}^{3}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification39.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.6 \cdot 10^{-47}:\\ \;\;\;\;2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\ \mathbf{elif}\;k \leq 8.4 \cdot 10^{+80}:\\ \;\;\;\;\left(\ell \cdot \frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k}\right) \cdot \left(\ell \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(t \cdot \sqrt[3]{{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}^{2}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 75.3% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 6.8 \cdot 10^{-26}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\ \end{array} \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
 (*
  t_s
  (if (<= t_m 6.8e-26)
    (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
    (/
     2.0
     (pow
      (* k (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)))
      2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 6.8e-26) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else {
		tmp = 2.0 / pow((k * (hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / 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 (t_m <= 6.8e-26) {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else {
		tmp = 2.0 / Math.pow((k * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 6.8e-26:
		tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0)
	else:
		tmp = 2.0 / math.pow((k * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (math.pow(t_m, 1.5) / l))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 6.8e-26)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	else
		tmp = Float64(2.0 / (Float64(k * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 6.8e-26)
		tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0);
	else
		tmp = 2.0 / ((k * (hypot(1.0, hypot(1.0, (k / t_m))) * ((t_m ^ 1.5) / l))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.8e-26], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(k * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.8 \cdot 10^{-26}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 6.80000000000000026e-26

    1. Initial program 50.5%

      \[\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)} \]
    2. Simplified50.5%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr18.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*18.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified18.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 35.3%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. associate-/l*35.4%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
    9. Simplified35.4%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]

    if 6.80000000000000026e-26 < t

    1. Initial program 64.9%

      \[\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)} \]
    2. Simplified64.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr49.2%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*49.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified49.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 70.4%

      \[\leadsto \frac{2}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \color{blue}{k}\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 6.8 \cdot 10^{-26}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \frac{{t}^{1.5}}{\ell}\right)\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 75.5% accurate, 1.0× speedup?

\[\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.2 \cdot 10^{-25}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\ \end{array} \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
 (*
  t_s
  (if (<= t_m 8.2e-25)
    (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
    (* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) 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 <= 8.2e-25) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else {
		tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / 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 <= 8.2d-25) then
        tmp = 2.0d0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ** 2.0d0)
    else
        tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.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 <= 8.2e-25) {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else {
		tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / 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 <= 8.2e-25:
		tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0)
	else:
		tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / 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 <= 8.2e-25)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	else
		tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.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 <= 8.2e-25)
		tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0);
	else
		tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.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, 8.2e-25], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.2 \cdot 10^{-25}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 8.19999999999999974e-25

    1. Initial program 50.5%

      \[\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)} \]
    2. Simplified50.5%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr18.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*18.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified18.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in t around 0 35.3%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. associate-/l*35.4%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
    9. Simplified35.4%

      \[\leadsto \frac{2}{{\color{blue}{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]

    if 8.19999999999999974e-25 < t

    1. Initial program 64.9%

      \[\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)} \]
    2. Simplified64.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr49.2%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*49.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified49.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 62.1%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t}^{3}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. *-commutative62.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}}^{2}} \]
      2. associate-/l*62.0%

        \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
    9. Simplified62.0%

      \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}}^{2}} \]
    10. Step-by-step derivation
      1. div-inv62.0%

        \[\leadsto \color{blue}{2 \cdot \frac{1}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}} \]
      2. pow-flip63.0%

        \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)}} \]
      3. sqrt-pow172.3%

        \[\leadsto 2 \cdot {\left(\color{blue}{{t}^{\left(\frac{3}{2}\right)}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      4. metadata-eval72.3%

        \[\leadsto 2 \cdot {\left({t}^{\color{blue}{1.5}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      5. associate-*r/72.4%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \color{blue}{\frac{k \cdot \sqrt{2}}{\ell}}\right)}^{\left(-2\right)} \]
      6. metadata-eval72.4%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{\color{blue}{-2}} \]
    11. Applied egg-rr72.4%

      \[\leadsto \color{blue}{2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 70.0% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 4.4 \cdot 10^{-46}:\\ \;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\ \mathbf{elif}\;k \leq 9.5 \cdot 10^{+80}:\\ \;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 4.4e-46)
    (* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0))
    (if (<= k 9.5e+80)
      (/ 2.0 (* (/ (/ (pow t_m 3.0) l) l) (/ (* 2.0 (pow k 2.0)) (cos k))))
      (/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (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 <= 4.4e-46) {
		tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
	} else if (k <= 9.5e+80) {
		tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * ((2.0 * pow(k, 2.0)) / cos(k)));
	} else {
		tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / 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 <= 4.4d-46) then
        tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.0d0)) / l)) ** (-2.0d0))
    else if (k <= 9.5d+80) then
        tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * ((2.0d0 * (k ** 2.0d0)) / cos(k)))
    else
        tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (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 <= 4.4e-46) {
		tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
	} else if (k <= 9.5e+80) {
		tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * ((2.0 * Math.pow(k, 2.0)) / Math.cos(k)));
	} else {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / 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 <= 4.4e-46:
		tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / l)), -2.0)
	elif k <= 9.5e+80:
		tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * ((2.0 * math.pow(k, 2.0)) / math.cos(k)))
	else:
		tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / 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 <= 4.4e-46)
		tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0));
	elseif (k <= 9.5e+80)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(Float64(2.0 * (k ^ 2.0)) / cos(k))));
	else
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (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 <= 4.4e-46)
		tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.0)) / l)) ^ -2.0);
	elseif (k <= 9.5e+80)
		tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * ((2.0 * (k ^ 2.0)) / cos(k)));
	else
		tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (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, 4.4e-46], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.5e+80], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.4 \cdot 10^{-46}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\

\mathbf{elif}\;k \leq 9.5 \cdot 10^{+80}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\cos k}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 4.4000000000000002e-46

    1. Initial program 56.0%

      \[\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)} \]
    2. Simplified56.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr28.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*28.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified28.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 27.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t}^{3}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. *-commutative27.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}}^{2}} \]
      2. associate-/l*27.5%

        \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
    9. Simplified27.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}}^{2}} \]
    10. Step-by-step derivation
      1. div-inv27.5%

        \[\leadsto \color{blue}{2 \cdot \frac{1}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}} \]
      2. pow-flip27.8%

        \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)}} \]
      3. sqrt-pow130.8%

        \[\leadsto 2 \cdot {\left(\color{blue}{{t}^{\left(\frac{3}{2}\right)}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      4. metadata-eval30.8%

        \[\leadsto 2 \cdot {\left({t}^{\color{blue}{1.5}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      5. associate-*r/30.8%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \color{blue}{\frac{k \cdot \sqrt{2}}{\ell}}\right)}^{\left(-2\right)} \]
      6. metadata-eval30.8%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{\color{blue}{-2}} \]
    11. Applied egg-rr30.8%

      \[\leadsto \color{blue}{2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}} \]

    if 4.4000000000000002e-46 < k < 9.499999999999999e80

    1. Initial program 60.1%

      \[\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)} \]
    2. Simplified63.6%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 71.2%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot \frac{{\sin k}^{2}}{\cos k}\right)}} \]
    5. Step-by-step derivation
      1. *-commutative71.2%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(\frac{{\sin k}^{2}}{\cos k} \cdot 2\right)}} \]
      2. associate-*l/71.2%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\frac{{\sin k}^{2} \cdot 2}{\cos k}}} \]
    6. Simplified71.2%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\frac{{\sin k}^{2} \cdot 2}{\cos k}}} \]
    7. Taylor expanded in k around 0 70.8%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \frac{\color{blue}{{k}^{2}} \cdot 2}{\cos k}} \]

    if 9.499999999999999e80 < k

    1. Initial program 40.0%

      \[\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)} \]
    2. Simplified39.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 62.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*62.5%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*62.5%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified62.5%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 55.6%

      \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*55.6%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right)}} \]
    9. Simplified55.6%

      \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification39.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 4.4 \cdot 10^{-46}:\\ \;\;\;\;2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\ \mathbf{elif}\;k \leq 9.5 \cdot 10^{+80}:\\ \;\;\;\;\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 70.3% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 7 \cdot 10^{-47}:\\ \;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\ \mathbf{elif}\;k \leq 3.8 \cdot 10^{+80}:\\ \;\;\;\;\left(\ell \cdot \frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k}\right) \cdot \left(\ell \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 7e-47)
    (* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0))
    (if (<= k 3.8e+80)
      (* (* l (/ 2.0 (* (* (sin k) (pow t_m 3.0)) (tan k)))) (* l 0.5))
      (/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (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 <= 7e-47) {
		tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
	} else if (k <= 3.8e+80) {
		tmp = (l * (2.0 / ((sin(k) * pow(t_m, 3.0)) * tan(k)))) * (l * 0.5);
	} else {
		tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / 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 <= 7d-47) then
        tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.0d0)) / l)) ** (-2.0d0))
    else if (k <= 3.8d+80) then
        tmp = (l * (2.0d0 / ((sin(k) * (t_m ** 3.0d0)) * tan(k)))) * (l * 0.5d0)
    else
        tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (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 <= 7e-47) {
		tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
	} else if (k <= 3.8e+80) {
		tmp = (l * (2.0 / ((Math.sin(k) * Math.pow(t_m, 3.0)) * Math.tan(k)))) * (l * 0.5);
	} else {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / 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 <= 7e-47:
		tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / l)), -2.0)
	elif k <= 3.8e+80:
		tmp = (l * (2.0 / ((math.sin(k) * math.pow(t_m, 3.0)) * math.tan(k)))) * (l * 0.5)
	else:
		tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / 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 <= 7e-47)
		tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0));
	elseif (k <= 3.8e+80)
		tmp = Float64(Float64(l * Float64(2.0 / Float64(Float64(sin(k) * (t_m ^ 3.0)) * tan(k)))) * Float64(l * 0.5));
	else
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (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 <= 7e-47)
		tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.0)) / l)) ^ -2.0);
	elseif (k <= 3.8e+80)
		tmp = (l * (2.0 / ((sin(k) * (t_m ^ 3.0)) * tan(k)))) * (l * 0.5);
	else
		tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (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, 7e-47], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.8e+80], N[(N[(l * N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 7 \cdot 10^{-47}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\

\mathbf{elif}\;k \leq 3.8 \cdot 10^{+80}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k}\right) \cdot \left(\ell \cdot 0.5\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 6.9999999999999996e-47

    1. Initial program 56.0%

      \[\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)} \]
    2. Simplified56.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr28.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*28.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified28.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 27.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t}^{3}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. *-commutative27.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}}^{2}} \]
      2. associate-/l*27.5%

        \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
    9. Simplified27.5%

      \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}}^{2}} \]
    10. Step-by-step derivation
      1. div-inv27.5%

        \[\leadsto \color{blue}{2 \cdot \frac{1}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}} \]
      2. pow-flip27.8%

        \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)}} \]
      3. sqrt-pow130.8%

        \[\leadsto 2 \cdot {\left(\color{blue}{{t}^{\left(\frac{3}{2}\right)}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      4. metadata-eval30.8%

        \[\leadsto 2 \cdot {\left({t}^{\color{blue}{1.5}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      5. associate-*r/30.8%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \color{blue}{\frac{k \cdot \sqrt{2}}{\ell}}\right)}^{\left(-2\right)} \]
      6. metadata-eval30.8%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{\color{blue}{-2}} \]
    11. Applied egg-rr30.8%

      \[\leadsto \color{blue}{2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}} \]

    if 6.9999999999999996e-47 < k < 3.79999999999999997e80

    1. Initial program 60.1%

      \[\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)} \]
    2. Simplified60.2%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*63.8%

        \[\leadsto \frac{\color{blue}{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. *-un-lft-identity63.8%

        \[\leadsto \frac{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}{\color{blue}{1 \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}} \]
      3. times-frac63.8%

        \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
      4. associate-*r*63.7%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr63.7%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    6. Taylor expanded in k around 0 71.2%

      \[\leadsto \frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \color{blue}{\left(0.5 \cdot \ell\right)} \]
    7. Step-by-step derivation
      1. *-commutative71.2%

        \[\leadsto \frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \color{blue}{\left(\ell \cdot 0.5\right)} \]
    8. Simplified71.2%

      \[\leadsto \frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \color{blue}{\left(\ell \cdot 0.5\right)} \]

    if 3.79999999999999997e80 < k

    1. Initial program 40.0%

      \[\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)} \]
    2. Simplified39.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 62.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*62.5%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*62.5%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified62.5%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 55.6%

      \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*55.6%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right)}} \]
    9. Simplified55.6%

      \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification39.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7 \cdot 10^{-47}:\\ \;\;\;\;2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\ \mathbf{elif}\;k \leq 3.8 \cdot 10^{+80}:\\ \;\;\;\;\left(\ell \cdot \frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k}\right) \cdot \left(\ell \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 69.6% accurate, 1.3× speedup?

\[\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.08 \cdot 10^{+55}:\\ \;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 1.08e+55)
    (* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0))
    (/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (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.08e+55) {
		tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
	} else {
		tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / 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.08d+55) then
        tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.0d0)) / l)) ** (-2.0d0))
    else
        tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (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.08e+55) {
		tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
	} else {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / 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.08e+55:
		tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / l)), -2.0)
	else:
		tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / 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.08e+55)
		tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0));
	else
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (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.08e+55)
		tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.0)) / l)) ^ -2.0);
	else
		tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (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.08e+55], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.08 \cdot 10^{+55}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.08000000000000004e55

    1. Initial program 57.5%

      \[\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)} \]
    2. Simplified57.5%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr28.7%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*28.7%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified28.7%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 27.4%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t}^{3}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. *-commutative27.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}}^{2}} \]
      2. associate-/l*27.4%

        \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
    9. Simplified27.4%

      \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}}^{2}} \]
    10. Step-by-step derivation
      1. div-inv27.4%

        \[\leadsto \color{blue}{2 \cdot \frac{1}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}} \]
      2. pow-flip27.7%

        \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)}} \]
      3. sqrt-pow130.3%

        \[\leadsto 2 \cdot {\left(\color{blue}{{t}^{\left(\frac{3}{2}\right)}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      4. metadata-eval30.3%

        \[\leadsto 2 \cdot {\left({t}^{\color{blue}{1.5}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      5. associate-*r/30.3%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \color{blue}{\frac{k \cdot \sqrt{2}}{\ell}}\right)}^{\left(-2\right)} \]
      6. metadata-eval30.3%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{\color{blue}{-2}} \]
    11. Applied egg-rr30.3%

      \[\leadsto \color{blue}{2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}} \]

    if 1.08000000000000004e55 < k

    1. Initial program 38.3%

      \[\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)} \]
    2. Simplified38.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 65.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*65.8%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*65.8%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified65.8%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 52.0%

      \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*52.0%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right)}} \]
    9. Simplified52.0%

      \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 69.2% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 4.8 \cdot 10^{-13}:\\ \;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 4.8e-13)
    (* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0))
    (/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.8e-13) {
		tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
	} else {
		tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 4.8d-13) then
        tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.0d0)) / l)) ** (-2.0d0))
    else
        tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.8e-13) {
		tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
	} else {
		tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 4.8e-13:
		tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / l)), -2.0)
	else:
		tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 4.8e-13)
		tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0));
	else
		tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 4.8e-13)
		tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.0)) / l)) ^ -2.0);
	else
		tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.8e-13], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.8 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 4.7999999999999997e-13

    1. Initial program 57.1%

      \[\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)} \]
    2. Simplified57.1%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr29.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*29.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified29.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 28.6%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t}^{3}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. *-commutative28.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}}^{2}} \]
      2. associate-/l*28.6%

        \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
    9. Simplified28.6%

      \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}}^{2}} \]
    10. Step-by-step derivation
      1. div-inv28.6%

        \[\leadsto \color{blue}{2 \cdot \frac{1}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}} \]
      2. pow-flip28.9%

        \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)}} \]
      3. sqrt-pow131.7%

        \[\leadsto 2 \cdot {\left(\color{blue}{{t}^{\left(\frac{3}{2}\right)}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      4. metadata-eval31.7%

        \[\leadsto 2 \cdot {\left({t}^{\color{blue}{1.5}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)} \]
      5. associate-*r/31.7%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \color{blue}{\frac{k \cdot \sqrt{2}}{\ell}}\right)}^{\left(-2\right)} \]
      6. metadata-eval31.7%

        \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{\color{blue}{-2}} \]
    11. Applied egg-rr31.7%

      \[\leadsto \color{blue}{2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}} \]

    if 4.7999999999999997e-13 < k

    1. Initial program 44.3%

      \[\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)} \]
    2. Simplified44.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*65.4%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*65.5%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified65.5%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 49.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*46.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified46.2%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow146.2%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. div-inv46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{{\ell}^{2}}\right)}\right)}^{1}} \]
      3. pow-flip46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      4. metadata-eval46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr46.2%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow146.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*49.0%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative49.0%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
    13. Simplified49.0%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right) \cdot {\ell}^{-2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 4.8 \cdot 10^{-13}:\\ \;\;\;\;2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 69.2% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 4.6 \cdot 10^{-13}:\\ \;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 4.6e-13)
    (* 2.0 (pow (* (pow t_m 1.5) (* k (/ (sqrt 2.0) l))) -2.0))
    (/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.6e-13) {
		tmp = 2.0 * pow((pow(t_m, 1.5) * (k * (sqrt(2.0) / l))), -2.0);
	} else {
		tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 4.6d-13) then
        tmp = 2.0d0 * (((t_m ** 1.5d0) * (k * (sqrt(2.0d0) / l))) ** (-2.0d0))
    else
        tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.6e-13) {
		tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * (k * (Math.sqrt(2.0) / l))), -2.0);
	} else {
		tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 4.6e-13:
		tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * (k * (math.sqrt(2.0) / l))), -2.0)
	else:
		tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 4.6e-13)
		tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(k * Float64(sqrt(2.0) / l))) ^ -2.0));
	else
		tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 4.6e-13)
		tmp = 2.0 * (((t_m ^ 1.5) * (k * (sqrt(2.0) / l))) ^ -2.0);
	else
		tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.6e-13], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.6 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{-2}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 4.59999999999999958e-13

    1. Initial program 57.1%

      \[\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)} \]
    2. Simplified57.1%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr29.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r*29.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    6. Simplified29.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    7. Taylor expanded in k around 0 28.6%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t}^{3}}\right)}}^{2}} \]
    8. Step-by-step derivation
      1. *-commutative28.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}}^{2}} \]
      2. associate-/l*28.6%

        \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
    9. Simplified28.6%

      \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}}^{2}} \]
    10. Step-by-step derivation
      1. *-un-lft-identity28.6%

        \[\leadsto \color{blue}{1 \cdot \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}} \]
      2. div-inv28.6%

        \[\leadsto 1 \cdot \color{blue}{\left(2 \cdot \frac{1}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}\right)} \]
      3. pow-flip28.9%

        \[\leadsto 1 \cdot \left(2 \cdot \color{blue}{{\left(\sqrt{{t}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)}}\right) \]
      4. sqrt-pow131.7%

        \[\leadsto 1 \cdot \left(2 \cdot {\left(\color{blue}{{t}^{\left(\frac{3}{2}\right)}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)}\right) \]
      5. metadata-eval31.7%

        \[\leadsto 1 \cdot \left(2 \cdot {\left({t}^{\color{blue}{1.5}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{\left(-2\right)}\right) \]
      6. associate-*r/31.7%

        \[\leadsto 1 \cdot \left(2 \cdot {\left({t}^{1.5} \cdot \color{blue}{\frac{k \cdot \sqrt{2}}{\ell}}\right)}^{\left(-2\right)}\right) \]
      7. metadata-eval31.7%

        \[\leadsto 1 \cdot \left(2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{\color{blue}{-2}}\right) \]
    11. Applied egg-rr31.7%

      \[\leadsto \color{blue}{1 \cdot \left(2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\right)} \]
    12. Step-by-step derivation
      1. *-lft-identity31.7%

        \[\leadsto \color{blue}{2 \cdot {\left({t}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}} \]
      2. *-commutative31.7%

        \[\leadsto 2 \cdot {\color{blue}{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot {t}^{1.5}\right)}}^{-2} \]
      3. associate-/l*31.7%

        \[\leadsto 2 \cdot {\left(\color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)} \cdot {t}^{1.5}\right)}^{-2} \]
    13. Simplified31.7%

      \[\leadsto \color{blue}{2 \cdot {\left(\left(k \cdot \frac{\sqrt{2}}{\ell}\right) \cdot {t}^{1.5}\right)}^{-2}} \]

    if 4.59999999999999958e-13 < k

    1. Initial program 44.3%

      \[\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)} \]
    2. Simplified44.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*65.4%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*65.5%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified65.5%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 49.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*46.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified46.2%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow146.2%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. div-inv46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{{\ell}^{2}}\right)}\right)}^{1}} \]
      3. pow-flip46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      4. metadata-eval46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr46.2%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow146.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*49.0%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative49.0%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
    13. Simplified49.0%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right) \cdot {\ell}^{-2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 4.6 \cdot 10^{-13}:\\ \;\;\;\;2 \cdot {\left({t}^{1.5} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 59.4% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 4.2 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 4.2e-13)
    (/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (pow k 2.0))))
    (/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.2e-13) {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * pow(k, 2.0)));
	} else {
		tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 4.2d-13) then
        tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k ** 2.0d0)))
    else
        tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.2e-13) {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * Math.pow(k, 2.0)));
	} else {
		tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 4.2e-13:
		tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * math.pow(k, 2.0)))
	else:
		tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 4.2e-13)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * (k ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 4.2e-13)
		tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k ^ 2.0)));
	else
		tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.2e-13], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.2 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 4.19999999999999977e-13

    1. Initial program 57.1%

      \[\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)} \]
    2. Simplified54.5%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 52.8%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. unpow352.8%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. *-un-lft-identity52.8%

        \[\leadsto \frac{2}{\frac{\frac{\left(t \cdot t\right) \cdot t}{\color{blue}{1 \cdot \ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. times-frac54.3%

        \[\leadsto \frac{2}{\frac{\color{blue}{\frac{t \cdot t}{1} \cdot \frac{t}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. pow254.3%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{t}^{2}}}{1} \cdot \frac{t}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    6. Applied egg-rr54.3%

      \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{t}^{2}}{1} \cdot \frac{t}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]

    if 4.19999999999999977e-13 < k

    1. Initial program 44.3%

      \[\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)} \]
    2. Simplified44.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*65.4%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*65.5%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified65.5%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 49.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*46.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified46.2%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow146.2%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. div-inv46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{{\ell}^{2}}\right)}\right)}^{1}} \]
      3. pow-flip46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      4. metadata-eval46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr46.2%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow146.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*49.0%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative49.0%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
    13. Simplified49.0%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right) \cdot {\ell}^{-2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 4.2 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\frac{{t}^{2} \cdot \frac{t}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 59.4% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 4.1 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 4.1e-13)
    (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* t_m (/ (pow t_m 2.0) l)) l)))
    (/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.1e-13) {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((t_m * (pow(t_m, 2.0) / l)) / l));
	} else {
		tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 4.1d-13) then
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m * ((t_m ** 2.0d0) / l)) / l))
    else
        tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.1e-13) {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((t_m * (Math.pow(t_m, 2.0) / l)) / l));
	} else {
		tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 4.1e-13:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((t_m * (math.pow(t_m, 2.0) / l)) / l))
	else:
		tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 4.1e-13)
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64(t_m * Float64((t_m ^ 2.0) / l)) / l)));
	else
		tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 4.1e-13)
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * ((t_m * ((t_m ^ 2.0) / l)) / l));
	else
		tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.1e-13], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.1 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 4.1000000000000002e-13

    1. Initial program 57.1%

      \[\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)} \]
    2. Simplified54.5%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 52.8%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. cube-mult52.8%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{t \cdot \left(t \cdot t\right)}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. *-un-lft-identity52.8%

        \[\leadsto \frac{2}{\frac{\frac{t \cdot \left(t \cdot t\right)}{\color{blue}{1 \cdot \ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. times-frac54.3%

        \[\leadsto \frac{2}{\frac{\color{blue}{\frac{t}{1} \cdot \frac{t \cdot t}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. pow254.3%

        \[\leadsto \frac{2}{\frac{\frac{t}{1} \cdot \frac{\color{blue}{{t}^{2}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    6. Applied egg-rr54.3%

      \[\leadsto \frac{2}{\frac{\color{blue}{\frac{t}{1} \cdot \frac{{t}^{2}}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]

    if 4.1000000000000002e-13 < k

    1. Initial program 44.3%

      \[\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)} \]
    2. Simplified44.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*65.4%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*65.5%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified65.5%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 49.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*46.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified46.2%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow146.2%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. div-inv46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{{\ell}^{2}}\right)}\right)}^{1}} \]
      3. pow-flip46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      4. metadata-eval46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr46.2%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow146.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*49.0%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative49.0%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
    13. Simplified49.0%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right) \cdot {\ell}^{-2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 4.1 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t \cdot \frac{{t}^{2}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 59.7% accurate, 1.9× speedup?

\[\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^{+143}:\\ \;\;\;\;\frac{2}{\left({t\_m}^{2} \cdot \frac{t\_m}{\ell}\right) \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 1e+143)
    (/ 2.0 (* (* (pow t_m 2.0) (/ t_m l)) (/ (* 2.0 (pow k 2.0)) l)))
    (/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1e+143) {
		tmp = 2.0 / ((pow(t_m, 2.0) * (t_m / l)) * ((2.0 * pow(k, 2.0)) / l));
	} else {
		tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 1d+143) then
        tmp = 2.0d0 / (((t_m ** 2.0d0) * (t_m / l)) * ((2.0d0 * (k ** 2.0d0)) / l))
    else
        tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1e+143) {
		tmp = 2.0 / ((Math.pow(t_m, 2.0) * (t_m / l)) * ((2.0 * Math.pow(k, 2.0)) / l));
	} else {
		tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 1e+143:
		tmp = 2.0 / ((math.pow(t_m, 2.0) * (t_m / l)) * ((2.0 * math.pow(k, 2.0)) / l))
	else:
		tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 1e+143)
		tmp = Float64(2.0 / Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) * Float64(Float64(2.0 * (k ^ 2.0)) / l)));
	else
		tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 1e+143)
		tmp = 2.0 / (((t_m ^ 2.0) * (t_m / l)) * ((2.0 * (k ^ 2.0)) / l));
	else
		tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e+143], N[(2.0 / N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 10^{+143}:\\
\;\;\;\;\frac{2}{\left({t\_m}^{2} \cdot \frac{t\_m}{\ell}\right) \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1e143

    1. Initial program 56.5%

      \[\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)} \]
    2. Simplified55.1%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 51.2%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. associate-*l/51.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    6. Applied egg-rr51.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    7. Step-by-step derivation
      1. associate-/l*52.0%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    8. Simplified52.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    9. Step-by-step derivation
      1. unpow351.2%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. *-un-lft-identity51.2%

        \[\leadsto \frac{2}{\frac{\frac{\left(t \cdot t\right) \cdot t}{\color{blue}{1 \cdot \ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. times-frac52.6%

        \[\leadsto \frac{2}{\frac{\color{blue}{\frac{t \cdot t}{1} \cdot \frac{t}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. pow252.6%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{t}^{2}}}{1} \cdot \frac{t}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    10. Applied egg-rr52.9%

      \[\leadsto \frac{2}{\color{blue}{\left(\frac{{t}^{2}}{1} \cdot \frac{t}{\ell}\right)} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]

    if 1e143 < k

    1. Initial program 34.7%

      \[\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)} \]
    2. Simplified34.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 58.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*58.0%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*58.0%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified58.0%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 58.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*58.0%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified58.0%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow158.0%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. div-inv58.0%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{{\ell}^{2}}\right)}\right)}^{1}} \]
      3. pow-flip58.0%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      4. metadata-eval58.0%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr58.0%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow158.0%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*58.0%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative58.0%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
    13. Simplified58.0%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right) \cdot {\ell}^{-2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 10^{+143}:\\ \;\;\;\;\frac{2}{\left({t}^{2} \cdot \frac{t}{\ell}\right) \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 57.7% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 4.4 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 4.4e-13)
    (/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (/ (pow k 2.0) l))) l))
    (/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.4e-13) {
		tmp = 2.0 / ((pow(t_m, 3.0) * (2.0 * (pow(k, 2.0) / l))) / l);
	} else {
		tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 4.4d-13) then
        tmp = 2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * ((k ** 2.0d0) / l))) / l)
    else
        tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.4e-13) {
		tmp = 2.0 / ((Math.pow(t_m, 3.0) * (2.0 * (Math.pow(k, 2.0) / l))) / l);
	} else {
		tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 4.4e-13:
		tmp = 2.0 / ((math.pow(t_m, 3.0) * (2.0 * (math.pow(k, 2.0) / l))) / l)
	else:
		tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 4.4e-13)
		tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * Float64((k ^ 2.0) / l))) / l));
	else
		tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 4.4e-13)
		tmp = 2.0 / (((t_m ^ 3.0) * (2.0 * ((k ^ 2.0) / l))) / l);
	else
		tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.4e-13], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.4 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 4.39999999999999993e-13

    1. Initial program 57.1%

      \[\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)} \]
    2. Simplified54.5%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 52.8%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. associate-*l/53.4%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    6. Applied egg-rr53.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    7. Step-by-step derivation
      1. associate-/l*53.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    8. Simplified53.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    9. Step-by-step derivation
      1. associate-*l/53.8%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}{\ell}}} \]
      2. associate-/l*53.8%

        \[\leadsto \frac{2}{\frac{{t}^{3} \cdot \color{blue}{\left(2 \cdot \frac{{k}^{2}}{\ell}\right)}}{\ell}} \]
    10. Applied egg-rr53.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}} \]

    if 4.39999999999999993e-13 < k

    1. Initial program 44.3%

      \[\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)} \]
    2. Simplified44.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*65.4%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*65.5%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified65.5%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 49.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*46.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified46.2%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow146.2%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. div-inv46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{{\ell}^{2}}\right)}\right)}^{1}} \]
      3. pow-flip46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      4. metadata-eval46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr46.2%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow146.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*49.0%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative49.0%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
    13. Simplified49.0%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right) \cdot {\ell}^{-2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 4.4 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\frac{{t}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 57.8% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 4.4 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 4.4e-13)
    (/ 2.0 (* (/ (pow t_m 3.0) l) (/ (* 2.0 (pow k 2.0)) l)))
    (/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.4e-13) {
		tmp = 2.0 / ((pow(t_m, 3.0) / l) * ((2.0 * pow(k, 2.0)) / l));
	} else {
		tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 4.4d-13) then
        tmp = 2.0d0 / (((t_m ** 3.0d0) / l) * ((2.0d0 * (k ** 2.0d0)) / l))
    else
        tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 4.4e-13) {
		tmp = 2.0 / ((Math.pow(t_m, 3.0) / l) * ((2.0 * Math.pow(k, 2.0)) / l));
	} else {
		tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 4.4e-13:
		tmp = 2.0 / ((math.pow(t_m, 3.0) / l) * ((2.0 * math.pow(k, 2.0)) / l))
	else:
		tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 4.4e-13)
		tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(Float64(2.0 * (k ^ 2.0)) / l)));
	else
		tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 4.4e-13)
		tmp = 2.0 / (((t_m ^ 3.0) / l) * ((2.0 * (k ^ 2.0)) / l));
	else
		tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.4e-13], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.4 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 4.39999999999999993e-13

    1. Initial program 57.1%

      \[\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)} \]
    2. Simplified54.5%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 52.8%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. associate-*l/53.4%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    6. Applied egg-rr53.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    7. Step-by-step derivation
      1. associate-/l*53.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    8. Simplified53.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]

    if 4.39999999999999993e-13 < k

    1. Initial program 44.3%

      \[\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)} \]
    2. Simplified44.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*65.4%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*65.5%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified65.5%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 49.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*46.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified46.2%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow146.2%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. div-inv46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{{\ell}^{2}}\right)}\right)}^{1}} \]
      3. pow-flip46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      4. metadata-eval46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr46.2%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow146.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*49.0%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative49.0%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
    13. Simplified49.0%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right) \cdot {\ell}^{-2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 4.4 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 57.4% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 5 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\ \end{array} \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
 (*
  t_s
  (if (<= k 5e-13)
    (/ 2.0 (* (/ (/ (pow t_m 3.0) l) l) (* 2.0 (pow k 2.0))))
    (/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 5e-13) {
		tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * (2.0 * pow(k, 2.0)));
	} else {
		tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 5d-13) then
        tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * (2.0d0 * (k ** 2.0d0)))
    else
        tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 5e-13) {
		tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * (2.0 * Math.pow(k, 2.0)));
	} else {
		tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 5e-13:
		tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * (2.0 * math.pow(k, 2.0)))
	else:
		tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 5e-13)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(2.0 * (k ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 5e-13)
		tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * (2.0 * (k ^ 2.0)));
	else
		tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 5e-13], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 5 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 4.9999999999999999e-13

    1. Initial program 57.1%

      \[\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)} \]
    2. Simplified54.5%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 52.8%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]

    if 4.9999999999999999e-13 < k

    1. Initial program 44.3%

      \[\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)} \]
    2. Simplified44.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-/l*65.4%

        \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*65.5%

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    6. Simplified65.5%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    7. Taylor expanded in k around 0 49.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*46.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified46.2%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow146.2%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. div-inv46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{{\ell}^{2}}\right)}\right)}^{1}} \]
      3. pow-flip46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      4. metadata-eval46.2%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr46.2%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow146.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*49.0%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative49.0%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
    13. Simplified49.0%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right) \cdot {\ell}^{-2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 5 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 52.3% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\frac{t\_m \cdot {k}^{4}}{{\ell}^{2}}} \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
 (* t_s (/ 2.0 (/ (* t_m (pow k 4.0)) (pow l 2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((t_m * pow(k, 4.0)) / pow(l, 2.0)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / ((t_m * (k ** 4.0d0)) / (l ** 2.0d0)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((t_m * Math.pow(k, 4.0)) / Math.pow(l, 2.0)));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / ((t_m * math.pow(k, 4.0)) / math.pow(l, 2.0)))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / (l ^ 2.0))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / ((t_m * (k ^ 4.0)) / (l ^ 2.0)));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{\frac{t\_m \cdot {k}^{4}}{{\ell}^{2}}}
\end{array}
Derivation
  1. Initial program 53.8%

    \[\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)} \]
  2. Simplified53.8%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in t around 0 56.3%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  5. Step-by-step derivation
    1. associate-/l*56.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
    2. associate-/l*57.1%

      \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
  6. Simplified57.1%

    \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
  7. Taylor expanded in k around 0 47.7%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  8. Final simplification47.7%

    \[\leadsto \frac{2}{\frac{t \cdot {k}^{4}}{{\ell}^{2}}} \]
  9. Add Preprocessing

Alternative 27: 52.3% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\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
 (* t_s (/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}
\end{array}
Derivation
  1. Initial program 53.8%

    \[\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)} \]
  2. Simplified53.8%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in t around 0 56.3%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  5. Step-by-step derivation
    1. associate-/l*56.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
    2. associate-/l*57.1%

      \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
  6. Simplified57.1%

    \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
  7. Taylor expanded in k around 0 47.7%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  8. Step-by-step derivation
    1. associate-/l*47.0%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  9. Simplified47.0%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  10. Step-by-step derivation
    1. pow147.0%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
    2. div-inv47.0%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{{\ell}^{2}}\right)}\right)}^{1}} \]
    3. pow-flip47.0%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
    4. metadata-eval47.0%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
  11. Applied egg-rr47.0%

    \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
  12. Step-by-step derivation
    1. unpow147.0%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
    2. associate-*r*47.7%

      \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
    3. *-commutative47.7%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
  13. Simplified47.7%

    \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right) \cdot {\ell}^{-2}}} \]
  14. Final simplification47.7%

    \[\leadsto \frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)} \]
  15. Add Preprocessing

Alternative 28: 52.3% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\right) \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\right)
\end{array}
Derivation
  1. Initial program 53.8%

    \[\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)} \]
  2. Simplified53.8%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in t around 0 56.3%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  5. Step-by-step derivation
    1. associate-/l*56.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
    2. associate-/l*57.1%

      \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
  6. Simplified57.1%

    \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
  7. Taylor expanded in k around 0 47.7%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  8. Step-by-step derivation
    1. associate-/l*47.0%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  9. Simplified47.0%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  10. Taylor expanded in k around 0 47.7%

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  11. Final simplification47.7%

    \[\leadsto 2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}} \]
  12. Add Preprocessing

Reproduce

?
herbie shell --seed 2024106 
(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))))