Toniolo and Linder, Equation (10+)

Percentage Accurate: 53.8% → 82.8%
Time: 20.5s
Alternatives: 17
Speedup: 2.0×

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

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


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

    1. Initial program 49.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. Simplified49.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. Applied egg-rr12.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*12.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. Simplified12.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 31.0%

      \[\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*31.0%

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

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

    if 1.3499999999999999e-110 < t

    1. Initial program 68.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. Simplified68.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 49.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. Simplified49.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-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 32.7%

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

    if 1.8499999999999999e-72 < t

    1. Initial program 70.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. Simplified70.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-cbrt70.1%

        \[\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. pow370.1%

        \[\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. *-commutative70.1%

        \[\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-prod70.1%

        \[\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-div70.1%

        \[\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-cube73.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-prod92.7%

        \[\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. pow292.7%

        \[\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-rr92.7%

      \[\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. add-cube-cbrt92.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}} \cdot \sqrt[3]{\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right) \cdot \sqrt[3]{\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)} \]
      2. pow392.2%

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

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

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

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

      \[\leadsto \frac{2}{{\color{blue}{\left({\left(\sqrt[3]{\sqrt[3]{\sin k} \cdot \left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}\right)}^{3}\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. pow192.3%

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

        \[\leadsto \frac{2}{{\left({\color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{\sin k} \cdot \left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)} \cdot \sqrt[3]{\sqrt[3]{\sin k} \cdot \left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}\right) \cdot \sqrt[3]{\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. add-cube-cbrt92.7%

        \[\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}} \]
      4. unpow-prod-down91.3%

        \[\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}} \]
      5. pow391.3%

        \[\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}} \]
      6. add-cube-cbrt91.5%

        \[\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}} \]
      7. associate-+r+91.5%

        \[\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}} \]
      8. metadata-eval91.5%

        \[\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}} \]
    9. Applied egg-rr91.5%

      \[\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}}} \]
    10. Step-by-step derivation
      1. unpow191.5%

        \[\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*91.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. *-commutative91.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.85 \cdot 10^{-72}:\\ \;\;\;\;\frac{2}{{\left(\sqrt{\frac{t}{\cos k}} \cdot \frac{k \cdot \sin k}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\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)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 79.1% accurate, 0.7× 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^{-110}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m}\right)}^{3}}{\sin k}}{0.5 \cdot \tan k}}{2 + {\left(\frac{k}{t\_m}\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 2.4e-110)
    (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
    (/
     (/ (/ (pow (/ (pow (cbrt l) 2.0) t_m) 3.0) (sin k)) (* 0.5 (tan k)))
     (+ 2.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 <= 2.4e-110) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else {
		tmp = ((pow((pow(cbrt(l), 2.0) / t_m), 3.0) / sin(k)) / (0.5 * tan(k))) / (2.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 <= 2.4e-110) {
		tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else {
		tmp = ((Math.pow((Math.pow(Math.cbrt(l), 2.0) / t_m), 3.0) / Math.sin(k)) / (0.5 * Math.tan(k))) / (2.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 <= 2.4e-110)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	else
		tmp = Float64(Float64(Float64((Float64((cbrt(l) ^ 2.0) / t_m) ^ 3.0) / sin(k)) / Float64(0.5 * tan(k))) / Float64(2.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, 2.4e-110], 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[(N[(N[(N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(0.5 * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.4 \cdot 10^{-110}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

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


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

    1. Initial program 49.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. Simplified49.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. Applied egg-rr12.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*12.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. Simplified12.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 31.0%

      \[\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*31.0%

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

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

    if 2.40000000000000006e-110 < t

    1. Initial program 68.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. Simplified68.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t\_m \leq 3.9 \cdot 10^{+197}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right)}\\

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


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

    1. Initial program 49.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. Simplified49.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-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 32.7%

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

    if 2.4e-72 < t < 3.9e197

    1. Initial program 67.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. Simplified67.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. add-sqr-sqrt67.7%

        \[\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. pow267.7%

        \[\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-div67.6%

        \[\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-pow170.0%

        \[\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-eval70.0%

        \[\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-prod52.7%

        \[\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-sqrt90.6%

        \[\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-rr90.6%

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

    if 3.9e197 < t

    1. Initial program 76.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. Simplified76.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-cube-cbrt76.6%

        \[\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. pow376.6%

        \[\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. *-commutative76.6%

        \[\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-prod76.6%

        \[\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-div76.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-cube77.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-prod95.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. pow295.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-rr95.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. Taylor expanded in k around 0 95.1%

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

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

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

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

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

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


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

    1. Initial program 49.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. Simplified49.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-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 32.7%

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

    if 1.75e-72 < t < 1.6000000000000001e138

    1. Initial program 74.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. Simplified74.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. Step-by-step derivation
      1. unpow374.0%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac91.8%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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-rr91.8%

      \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)} \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. distribute-lft-in91.8%

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

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

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

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

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

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

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

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

    if 1.6000000000000001e138 < t

    1. Initial program 66.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. Simplified66.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. Step-by-step derivation
      1. add-cube-cbrt66.0%

        \[\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.0%

        \[\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.0%

        \[\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.0%

        \[\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.0%

        \[\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-cube69.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-prod94.4%

        \[\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. pow294.4%

        \[\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-rr94.4%

      \[\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. Taylor expanded in k around 0 86.3%

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

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

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

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

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

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


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

    1. Initial program 49.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. Simplified49.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-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 32.7%

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

    if 1.10000000000000001e-72 < t < 5.60000000000000033e133

    1. Initial program 74.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. Simplified74.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. Step-by-step derivation
      1. unpow374.0%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac91.8%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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-rr91.8%

      \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)} \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. distribute-lft-in91.8%

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

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

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

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

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

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

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

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

    if 5.60000000000000033e133 < t

    1. Initial program 66.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. Simplified66.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-rr41.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*41.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. Simplified41.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 k around 0 69.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. *-commutative69.5%

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

        \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
    9. Simplified69.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. add-cube-cbrt69.5%

        \[\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-rr80.6%

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 49.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. Simplified49.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-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 32.7%

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

    if 1.8499999999999999e-72 < t < 3.79999999999999963e100

    1. Initial program 79.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. Simplified79.3%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\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}} \]
    5. Applied egg-rr91.3%

      \[\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-identity91.3%

        \[\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. *-commutative91.3%

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

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

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

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

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

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

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

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

    if 3.79999999999999963e100 < t

    1. Initial program 62.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. Simplified62.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-rr48.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*48.8%

        \[\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. Simplified48.8%

      \[\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 65.9%

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

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

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

      \[\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-cbrt65.9%

        \[\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-rr80.5%

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

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

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

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

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

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

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

Alternative 8: 75.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 2.5 \cdot 10^{-72}:\\ \;\;\;\;\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(t\_m \cdot {\left(\sqrt[3]{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 (<= t_m 2.5e-72)
    (/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
    (/ 2.0 (pow (* t_m (pow (cbrt (* 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 (t_m <= 2.5e-72) {
		tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
	} else {
		tmp = 2.0 / pow((t_m * pow(cbrt((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 (t_m <= 2.5e-72) {
		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.pow(Math.cbrt((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 (t_m <= 2.5e-72)
		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 * (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[t$95$m, 2.5e-72], 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[(t$95$m * N[Power[N[Power[N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.5 \cdot 10^{-72}:\\
\;\;\;\;\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(t\_m \cdot {\left(\sqrt[3]{k \cdot \frac{\sqrt{2}}{\ell}}\right)}^{2}\right)}^{3}}\\


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

    1. Initial program 49.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. Simplified49.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-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 32.7%

      \[\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*32.7%

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

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

    if 2.4999999999999998e-72 < t

    1. Initial program 70.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. Simplified70.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. Applied egg-rr53.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*53.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. Simplified53.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 73.2%

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

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

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

      \[\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-cbrt73.2%

        \[\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-rr81.0%

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

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

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

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

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

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

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

Alternative 9: 75.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 1.6 \cdot 10^{-72}:\\ \;\;\;\;\frac{2}{{\left(\sqrt{\frac{t\_m}{\cos k}} \cdot \frac{k \cdot \sin k}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(t\_m \cdot {\left(\sqrt[3]{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 (<= t_m 1.6e-72)
    (/ 2.0 (pow (* (sqrt (/ t_m (cos k))) (/ (* k (sin k)) l)) 2.0))
    (/ 2.0 (pow (* t_m (pow (cbrt (* 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 (t_m <= 1.6e-72) {
		tmp = 2.0 / pow((sqrt((t_m / cos(k))) * ((k * sin(k)) / l)), 2.0);
	} else {
		tmp = 2.0 / pow((t_m * pow(cbrt((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 (t_m <= 1.6e-72) {
		tmp = 2.0 / Math.pow((Math.sqrt((t_m / Math.cos(k))) * ((k * Math.sin(k)) / l)), 2.0);
	} else {
		tmp = 2.0 / Math.pow((t_m * Math.pow(Math.cbrt((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 (t_m <= 1.6e-72)
		tmp = Float64(2.0 / (Float64(sqrt(Float64(t_m / cos(k))) * Float64(Float64(k * sin(k)) / l)) ^ 2.0));
	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[t$95$m, 1.6e-72], N[(2.0 / N[Power[N[(N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[Power[N[Power[N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

    1. Initial program 49.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. Simplified49.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-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 32.7%

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

    if 1.6e-72 < t

    1. Initial program 70.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. Simplified70.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. Applied egg-rr53.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*53.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. Simplified53.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 73.2%

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

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

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

      \[\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-cbrt73.2%

        \[\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-rr81.0%

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

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

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

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

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

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

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

Alternative 10: 70.2% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{{\left(t\_m \cdot {\left(\sqrt[3]{k \cdot \frac{\sqrt{2}}{\ell}}\right)}^{2}\right)}^{3}} \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 (* t_m (pow (cbrt (* 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) {
	return t_s * (2.0 / pow((t_m * pow(cbrt((k * (sqrt(2.0) / l))), 2.0)), 3.0));
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / Math.pow((t_m * Math.pow(Math.cbrt((k * (Math.sqrt(2.0) / l))), 2.0)), 3.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(t_m * (cbrt(Float64(k * Float64(sqrt(2.0) / l))) ^ 2.0)) ^ 3.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[Power[N[(t$95$m * N[Power[N[Power[N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $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 \frac{2}{{\left(t\_m \cdot {\left(\sqrt[3]{k \cdot \frac{\sqrt{2}}{\ell}}\right)}^{2}\right)}^{3}}
\end{array}
Derivation
  1. Initial program 55.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. Simplified55.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. Applied egg-rr26.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*26.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. Simplified26.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 29.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. *-commutative29.4%

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

      \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
  9. Simplified29.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. add-cube-cbrt29.4%

      \[\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-rr73.0%

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

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

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

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

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

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

    \[\leadsto \frac{2}{{\left(t \cdot {\left(\sqrt[3]{k \cdot \frac{\sqrt{2}}{\ell}}\right)}^{2}\right)}^{3}} \]
  15. Add Preprocessing

Alternative 11: 67.1% accurate, 1.4× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot {\left({t\_m}^{1.5} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{-2}\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 (* (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) {
	return t_s * (2.0 * pow((pow(t_m, 1.5) * (k * (sqrt(2.0) / 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 ** 1.5d0) * (k * (sqrt(2.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 * Math.pow((Math.pow(t_m, 1.5) * (k * (Math.sqrt(2.0) / 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 * math.pow((math.pow(t_m, 1.5) * (k * (math.sqrt(2.0) / 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((t_m ^ 1.5) * Float64(k * Float64(sqrt(2.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 ^ 1.5) * (k * (sqrt(2.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[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]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot {\left({t\_m}^{1.5} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{-2}\right)
\end{array}
Derivation
  1. Initial program 55.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. Simplified55.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. Applied egg-rr26.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*26.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. Simplified26.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 29.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. *-commutative29.4%

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

      \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
  9. Simplified29.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. *-un-lft-identity29.4%

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

      \[\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-flip29.4%

      \[\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-pow132.8%

      \[\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-eval32.8%

      \[\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. metadata-eval32.8%

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

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

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

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

    \[\leadsto 2 \cdot {\left({t}^{1.5} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{-2} \]
  15. Add Preprocessing

Alternative 12: 66.9% accurate, 1.4× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{{\left({t\_m}^{1.5} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{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 (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) {
	return t_s * (2.0 / pow((pow(t_m, 1.5) * (k * (sqrt(2.0) / 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 ** 1.5d0) * (k * (sqrt(2.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 / Math.pow((Math.pow(t_m, 1.5) * (k * (Math.sqrt(2.0) / 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 / math.pow((math.pow(t_m, 1.5) * (k * (math.sqrt(2.0) / 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((t_m ^ 1.5) * Float64(k * Float64(sqrt(2.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 ^ 1.5) * (k * (sqrt(2.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[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]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{{\left({t\_m}^{1.5} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}
\end{array}
Derivation
  1. Initial program 55.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. Simplified55.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. Applied egg-rr26.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*26.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. Simplified26.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 29.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. *-commutative29.4%

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

      \[\leadsto \frac{2}{{\left(\sqrt{{t}^{3}} \cdot \color{blue}{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}\right)}^{2}} \]
  9. Simplified29.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. *-un-lft-identity29.4%

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

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

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

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

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

    \[\leadsto \frac{2}{{\left(\color{blue}{{t}^{1.5}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}} \]
  14. Final simplification32.8%

    \[\leadsto \frac{2}{{\left({t}^{1.5} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}} \]
  15. Add Preprocessing

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

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

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


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

    1. Initial program 60.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. Simplified60.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. unpow360.3%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac74.5%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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-rr74.5%

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

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

    if 2.1e50 < k

    1. Initial program 40.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. Simplified48.4%

      \[\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 39.8%

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

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

Alternative 14: 59.2% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{{t\_m}^{2}}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.8 \cdot 10^{+41}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(t\_2 \cdot \frac{t\_m}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot t\_2}{\ell} \cdot \left(2 \cdot {k}^{2}\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 t_m 2.0) l)))
   (*
    t_s
    (if (<= k 1.8e+41)
      (/ 2.0 (* (* 2.0 k) (* (sin k) (* t_2 (/ t_m l)))))
      (/ 2.0 (* (/ (* t_m t_2) l) (* 2.0 (pow k 2.0))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = pow(t_m, 2.0) / l;
	double tmp;
	if (k <= 1.8e+41) {
		tmp = 2.0 / ((2.0 * k) * (sin(k) * (t_2 * (t_m / l))));
	} else {
		tmp = 2.0 / (((t_m * t_2) / l) * (2.0 * pow(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 = (t_m ** 2.0d0) / l
    if (k <= 1.8d+41) then
        tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * (t_2 * (t_m / l))))
    else
        tmp = 2.0d0 / (((t_m * t_2) / l) * (2.0d0 * (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(t_m, 2.0) / l;
	double tmp;
	if (k <= 1.8e+41) {
		tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (t_2 * (t_m / l))));
	} else {
		tmp = 2.0 / (((t_m * t_2) / l) * (2.0 * Math.pow(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(t_m, 2.0) / l
	tmp = 0
	if k <= 1.8e+41:
		tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (t_2 * (t_m / l))))
	else:
		tmp = 2.0 / (((t_m * t_2) / l) * (2.0 * math.pow(k, 2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64((t_m ^ 2.0) / l)
	tmp = 0.0
	if (k <= 1.8e+41)
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64(t_2 * Float64(t_m / l)))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * t_2) / l) * Float64(2.0 * (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 = (t_m ^ 2.0) / l;
	tmp = 0.0;
	if (k <= 1.8e+41)
		tmp = 2.0 / ((2.0 * k) * (sin(k) * (t_2 * (t_m / l))));
	else
		tmp = 2.0 / (((t_m * t_2) / l) * (2.0 * (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[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.8e+41], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(t$95$2 * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * t$95$2), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

    1. Initial program 60.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. Simplified60.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. Step-by-step derivation
      1. unpow360.5%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac74.8%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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-rr74.8%

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

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

    if 1.80000000000000013e41 < k

    1. Initial program 40.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. Simplified48.4%

      \[\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 40.1%

      \[\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-mult40.1%

        \[\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-identity40.1%

        \[\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-frac40.2%

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

        \[\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-rr40.2%

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

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

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

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

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


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

    1. Initial program 50.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. Simplified57.2%

      \[\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 56.7%

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

    if 1.90000000000000013e-24 < t

    1. Initial program 69.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. Simplified69.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 k around 0 68.1%

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

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

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

Alternative 16: 54.0% 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}{\left(k \cdot {t\_m}^{3}\right) \cdot \left(\left(2 \cdot k\right) \cdot {\ell}^{-2}\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 (* (* k (pow t_m 3.0)) (* (* 2.0 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) {
	return t_s * (2.0 / ((k * pow(t_m, 3.0)) * ((2.0 * k) * 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 / ((k * (t_m ** 3.0d0)) * ((2.0d0 * k) * (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 / ((k * Math.pow(t_m, 3.0)) * ((2.0 * k) * 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 / ((k * math.pow(t_m, 3.0)) * ((2.0 * k) * 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(k * (t_m ^ 3.0)) * Float64(Float64(2.0 * k) * (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 / ((k * (t_m ^ 3.0)) * ((2.0 * k) * (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[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * k), $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{\left(k \cdot {t\_m}^{3}\right) \cdot \left(\left(2 \cdot k\right) \cdot {\ell}^{-2}\right)}
\end{array}
Derivation
  1. Initial program 55.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. Simplified55.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 k around 0 53.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\left(k \cdot {t}^{3}\right) \cdot \left(\left(2 \cdot k\right) \cdot {\ell}^{-2}\right)} \]
  11. Add Preprocessing

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

\\
t\_s \cdot \frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t\_m}^{3}}{{\ell}^{2}}}
\end{array}
Derivation
  1. Initial program 55.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. Simplified55.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 k around 0 53.1%

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

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

    \[\leadsto \frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t}^{3}}{{\ell}^{2}}} \]
  7. Add Preprocessing

Reproduce

?
herbie shell --seed 2024115 
(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))))