Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.1% → 94.1%
Time: 19.1s
Alternatives: 17
Speedup: 3.8×

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: 35.1% 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: 94.1% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 34.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot {\left(\sqrt{\frac{\frac{\cos k}{{k}^{2}}}{t}} \cdot \left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{\frac{1}{{k}^{2}}}\right)\right)}^{2} \]
      10. add-sqr-sqrt45.0%

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

        \[\leadsto 2 \cdot {\left(\sqrt{\frac{\frac{\cos k}{{k}^{2}}}{t}} \cdot \left(\ell \cdot \sqrt{\color{blue}{{k}^{\left(-2\right)}}}\right)\right)}^{2} \]
      12. metadata-eval45.0%

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

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

    if 2.0000000000000001e-133 < k

    1. Initial program 31.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. Step-by-step derivation
      1. *-commutative31.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.7% accurate, 0.5× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot {\left(\frac{{\left(\sqrt[3]{t\_m \cdot \frac{\sqrt{2}}{k\_m}}\right)}^{2}}{t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k\_m \cdot \tan k\_m}\right)}\right)}^{3} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (pow
   (/
    (pow (cbrt (* t_m (/ (sqrt 2.0) k_m))) 2.0)
    (* t_m (* (pow (cbrt l) -2.0) (cbrt (* (sin k_m) (tan k_m))))))
   3.0)))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * pow((pow(cbrt((t_m * (sqrt(2.0) / k_m))), 2.0) / (t_m * (pow(cbrt(l), -2.0) * cbrt((sin(k_m) * tan(k_m)))))), 3.0);
}
k_m = Math.abs(k);
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_m) {
	return t_s * Math.pow((Math.pow(Math.cbrt((t_m * (Math.sqrt(2.0) / k_m))), 2.0) / (t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((Math.sin(k_m) * Math.tan(k_m)))))), 3.0);
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * (Float64((cbrt(Float64(t_m * Float64(sqrt(2.0) / k_m))) ^ 2.0) / Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(sin(k_m) * tan(k_m)))))) ^ 3.0))
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[Power[N[(N[Power[N[Power[N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot {\left(\frac{{\left(\sqrt[3]{t\_m \cdot \frac{\sqrt{2}}{k\_m}}\right)}^{2}}{t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k\_m \cdot \tan k\_m}\right)}\right)}^{3}
\end{array}
Derivation
  1. Initial program 33.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. Step-by-step derivation
    1. *-commutative33.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 85.0% accurate, 0.6× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 1.05 \cdot 10^{-17}:\\ \;\;\;\;2 \cdot {\left(\sqrt{\frac{\frac{\cos k\_m}{{k\_m}^{2}}}{t\_m}} \cdot \left(\ell \cdot \sqrt{{k\_m}^{-2}}\right)\right)}^{2}\\ \mathbf{elif}\;k\_m \leq 1.2 \cdot 10^{+148}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{{k\_m}^{2} \cdot \left(t\_m \cdot \left(\sin k\_m \cdot \tan k\_m\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{\frac{2}{\sin k\_m} \cdot \frac{{\left(\frac{k\_m}{t\_m}\right)}^{-2}}{\tan k\_m}}}{t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}}\right)}^{3}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 1.05e-17)
    (*
     2.0
     (pow
      (*
       (sqrt (/ (/ (cos k_m) (pow k_m 2.0)) t_m))
       (* l (sqrt (pow k_m -2.0))))
      2.0))
    (if (<= k_m 1.2e+148)
      (* 2.0 (/ (pow l 2.0) (* (pow k_m 2.0) (* t_m (* (sin k_m) (tan k_m))))))
      (pow
       (/
        (cbrt (* (/ 2.0 (sin k_m)) (/ (pow (/ k_m t_m) -2.0) (tan k_m))))
        (* t_m (pow (cbrt l) -2.0)))
       3.0)))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 1.05e-17) {
		tmp = 2.0 * pow((sqrt(((cos(k_m) / pow(k_m, 2.0)) / t_m)) * (l * sqrt(pow(k_m, -2.0)))), 2.0);
	} else if (k_m <= 1.2e+148) {
		tmp = 2.0 * (pow(l, 2.0) / (pow(k_m, 2.0) * (t_m * (sin(k_m) * tan(k_m)))));
	} else {
		tmp = pow((cbrt(((2.0 / sin(k_m)) * (pow((k_m / t_m), -2.0) / tan(k_m)))) / (t_m * pow(cbrt(l), -2.0))), 3.0);
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (k_m <= 1.05e-17) {
		tmp = 2.0 * Math.pow((Math.sqrt(((Math.cos(k_m) / Math.pow(k_m, 2.0)) / t_m)) * (l * Math.sqrt(Math.pow(k_m, -2.0)))), 2.0);
	} else if (k_m <= 1.2e+148) {
		tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow(k_m, 2.0) * (t_m * (Math.sin(k_m) * Math.tan(k_m)))));
	} else {
		tmp = Math.pow((Math.cbrt(((2.0 / Math.sin(k_m)) * (Math.pow((k_m / t_m), -2.0) / Math.tan(k_m)))) / (t_m * Math.pow(Math.cbrt(l), -2.0))), 3.0);
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 1.05e-17)
		tmp = Float64(2.0 * (Float64(sqrt(Float64(Float64(cos(k_m) / (k_m ^ 2.0)) / t_m)) * Float64(l * sqrt((k_m ^ -2.0)))) ^ 2.0));
	elseif (k_m <= 1.2e+148)
		tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((k_m ^ 2.0) * Float64(t_m * Float64(sin(k_m) * tan(k_m))))));
	else
		tmp = Float64(cbrt(Float64(Float64(2.0 / sin(k_m)) * Float64((Float64(k_m / t_m) ^ -2.0) / tan(k_m)))) / Float64(t_m * (cbrt(l) ^ -2.0))) ^ 3.0;
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 1.05e-17], N[(2.0 * N[Power[N[(N[Sqrt[N[(N[(N[Cos[k$95$m], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[N[Power[k$95$m, -2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1.2e+148], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[N[(N[(2.0 / N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(k$95$m / t$95$m), $MachinePrecision], -2.0], $MachinePrecision] / N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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


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

    1. Initial program 34.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. Simplified36.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot {\left(\sqrt{\frac{\frac{\cos k}{{k}^{2}}}{t}} \cdot \left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{\frac{1}{{k}^{2}}}\right)\right)}^{2} \]
      10. add-sqr-sqrt45.0%

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

        \[\leadsto 2 \cdot {\left(\sqrt{\frac{\frac{\cos k}{{k}^{2}}}{t}} \cdot \left(\ell \cdot \sqrt{\color{blue}{{k}^{\left(-2\right)}}}\right)\right)}^{2} \]
      12. metadata-eval45.0%

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

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

    if 1.04999999999999996e-17 < k < 1.19999999999999997e148

    1. Initial program 20.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. Simplified27.3%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod28.4%

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

        \[\leadsto \frac{2}{\log \left({\left(e^{{t}^{3}}\right)}^{\color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}\right)}}\right)} \cdot \left(\ell \cdot \ell\right) \]
      4. *-commutative28.4%

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

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

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left(\tan k \cdot \left(\sin k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    6. Taylor expanded in k around inf 86.1%

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

    if 1.19999999999999997e148 < k

    1. Initial program 45.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. Step-by-step derivation
      1. *-commutative45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 81.8% accurate, 0.7× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 3.05 \cdot 10^{-18}:\\ \;\;\;\;2 \cdot {\left(\sqrt{\frac{\frac{\cos k\_m}{{k\_m}^{2}}}{t\_m}} \cdot \left(\ell \cdot \sqrt{{k\_m}^{-2}}\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{{k\_m}^{2} \cdot \left(t\_m \cdot \left(\sin k\_m \cdot \tan k\_m\right)\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 3.05e-18)
    (*
     2.0
     (pow
      (*
       (sqrt (/ (/ (cos k_m) (pow k_m 2.0)) t_m))
       (* l (sqrt (pow k_m -2.0))))
      2.0))
    (*
     2.0
     (/ (pow l 2.0) (* (pow k_m 2.0) (* t_m (* (sin k_m) (tan k_m)))))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 3.05e-18) {
		tmp = 2.0 * pow((sqrt(((cos(k_m) / pow(k_m, 2.0)) / t_m)) * (l * sqrt(pow(k_m, -2.0)))), 2.0);
	} else {
		tmp = 2.0 * (pow(l, 2.0) / (pow(k_m, 2.0) * (t_m * (sin(k_m) * tan(k_m)))));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 3.05d-18) then
        tmp = 2.0d0 * ((sqrt(((cos(k_m) / (k_m ** 2.0d0)) / t_m)) * (l * sqrt((k_m ** (-2.0d0))))) ** 2.0d0)
    else
        tmp = 2.0d0 * ((l ** 2.0d0) / ((k_m ** 2.0d0) * (t_m * (sin(k_m) * tan(k_m)))))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (k_m <= 3.05e-18) {
		tmp = 2.0 * Math.pow((Math.sqrt(((Math.cos(k_m) / Math.pow(k_m, 2.0)) / t_m)) * (l * Math.sqrt(Math.pow(k_m, -2.0)))), 2.0);
	} else {
		tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow(k_m, 2.0) * (t_m * (Math.sin(k_m) * Math.tan(k_m)))));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 3.05e-18:
		tmp = 2.0 * math.pow((math.sqrt(((math.cos(k_m) / math.pow(k_m, 2.0)) / t_m)) * (l * math.sqrt(math.pow(k_m, -2.0)))), 2.0)
	else:
		tmp = 2.0 * (math.pow(l, 2.0) / (math.pow(k_m, 2.0) * (t_m * (math.sin(k_m) * math.tan(k_m)))))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 3.05e-18)
		tmp = Float64(2.0 * (Float64(sqrt(Float64(Float64(cos(k_m) / (k_m ^ 2.0)) / t_m)) * Float64(l * sqrt((k_m ^ -2.0)))) ^ 2.0));
	else
		tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((k_m ^ 2.0) * Float64(t_m * Float64(sin(k_m) * tan(k_m))))));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 3.05e-18)
		tmp = 2.0 * ((sqrt(((cos(k_m) / (k_m ^ 2.0)) / t_m)) * (l * sqrt((k_m ^ -2.0)))) ^ 2.0);
	else
		tmp = 2.0 * ((l ^ 2.0) / ((k_m ^ 2.0) * (t_m * (sin(k_m) * tan(k_m)))));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 3.05e-18], N[(2.0 * N[Power[N[(N[Sqrt[N[(N[(N[Cos[k$95$m], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[N[Power[k$95$m, -2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

    1. Initial program 34.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. Simplified36.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot {\left(\sqrt{\frac{\frac{\cos k}{{k}^{2}}}{t}} \cdot \left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{\frac{1}{{k}^{2}}}\right)\right)}^{2} \]
      10. add-sqr-sqrt45.0%

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

        \[\leadsto 2 \cdot {\left(\sqrt{\frac{\frac{\cos k}{{k}^{2}}}{t}} \cdot \left(\ell \cdot \sqrt{\color{blue}{{k}^{\left(-2\right)}}}\right)\right)}^{2} \]
      12. metadata-eval45.0%

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

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

    if 3.0499999999999999e-18 < k

    1. Initial program 33.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. Simplified40.7%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod34.0%

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left(\tan k \cdot \left(\sin k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    6. Taylor expanded in k around inf 76.8%

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

Alternative 5: 74.5% accurate, 0.8× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \left(\left({k\_m}^{-2} \cdot {\ell}^{2}\right) \cdot \frac{\cos k\_m}{t\_m \cdot {\sin k\_m}^{2}}\right)\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (*
   2.0
   (*
    (* (pow k_m -2.0) (pow l 2.0))
    (/ (cos k_m) (* t_m (pow (sin k_m) 2.0)))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 * ((pow(k_m, -2.0) * pow(l, 2.0)) * (cos(k_m) / (t_m * pow(sin(k_m), 2.0)))));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * (2.0d0 * (((k_m ** (-2.0d0)) * (l ** 2.0d0)) * (cos(k_m) / (t_m * (sin(k_m) ** 2.0d0)))))
end function
k_m = Math.abs(k);
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_m) {
	return t_s * (2.0 * ((Math.pow(k_m, -2.0) * Math.pow(l, 2.0)) * (Math.cos(k_m) / (t_m * Math.pow(Math.sin(k_m), 2.0)))));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * (2.0 * ((math.pow(k_m, -2.0) * math.pow(l, 2.0)) * (math.cos(k_m) / (t_m * math.pow(math.sin(k_m), 2.0)))))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(2.0 * Float64(Float64((k_m ^ -2.0) * (l ^ 2.0)) * Float64(cos(k_m) / Float64(t_m * (sin(k_m) ^ 2.0))))))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * (2.0 * (((k_m ^ -2.0) * (l ^ 2.0)) * (cos(k_m) / (t_m * (sin(k_m) ^ 2.0)))));
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k$95$m], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot \left(\left({k\_m}^{-2} \cdot {\ell}^{2}\right) \cdot \frac{\cos k\_m}{t\_m \cdot {\sin k\_m}^{2}}\right)\right)
\end{array}
Derivation
  1. Initial program 33.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. Simplified37.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 74.4% accurate, 1.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t\_m \cdot \left(\sin k\_m \cdot \tan k\_m\right)}\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t_m (* (sin k_m) (tan k_m)))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t_m * (sin(k_m) * tan(k_m)))));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * (2.0d0 * (((l ** 2.0d0) / (k_m ** 2.0d0)) / (t_m * (sin(k_m) * tan(k_m)))))
end function
k_m = Math.abs(k);
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_m) {
	return t_s * (2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t_m * (Math.sin(k_m) * Math.tan(k_m)))));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * (2.0 * ((math.pow(l, 2.0) / math.pow(k_m, 2.0)) / (t_m * (math.sin(k_m) * math.tan(k_m)))))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t_m * Float64(sin(k_m) * tan(k_m))))))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * (2.0 * (((l ^ 2.0) / (k_m ^ 2.0)) / (t_m * (sin(k_m) * tan(k_m)))));
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t\_m \cdot \left(\sin k\_m \cdot \tan k\_m\right)}\right)
\end{array}
Derivation
  1. Initial program 33.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. Simplified37.9%

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

      \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    2. exp-prod32.0%

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

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

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

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

    \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left(\tan k \cdot \left(\sin k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
  6. Taylor expanded in k around inf 75.7%

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

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

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

Alternative 7: 64.1% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{+278}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot e^{-4 \cdot \log k\_m + \log \left(\frac{2}{t\_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= (* l l) 2e+278)
    (* (* l l) (exp (+ (* -4.0 (log k_m)) (log (/ 2.0 t_m)))))
    (/ (* 2.0 (pow l 2.0)) 0.0))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if ((l * l) <= 2e+278) {
		tmp = (l * l) * exp(((-4.0 * log(k_m)) + log((2.0 / t_m))));
	} else {
		tmp = (2.0 * pow(l, 2.0)) / 0.0;
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if ((l * l) <= 2d+278) then
        tmp = (l * l) * exp((((-4.0d0) * log(k_m)) + log((2.0d0 / t_m))))
    else
        tmp = (2.0d0 * (l ** 2.0d0)) / 0.0d0
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if ((l * l) <= 2e+278) {
		tmp = (l * l) * Math.exp(((-4.0 * Math.log(k_m)) + Math.log((2.0 / t_m))));
	} else {
		tmp = (2.0 * Math.pow(l, 2.0)) / 0.0;
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if (l * l) <= 2e+278:
		tmp = (l * l) * math.exp(((-4.0 * math.log(k_m)) + math.log((2.0 / t_m))))
	else:
		tmp = (2.0 * math.pow(l, 2.0)) / 0.0
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (Float64(l * l) <= 2e+278)
		tmp = Float64(Float64(l * l) * exp(Float64(Float64(-4.0 * log(k_m)) + log(Float64(2.0 / t_m)))));
	else
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / 0.0);
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if ((l * l) <= 2e+278)
		tmp = (l * l) * exp(((-4.0 * log(k_m)) + log((2.0 / t_m))));
	else
		tmp = (2.0 * (l ^ 2.0)) / 0.0;
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e+278], N[(N[(l * l), $MachinePrecision] * N[Exp[N[(N[(-4.0 * N[Log[k$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[(2.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / 0.0), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 l l) < 1.99999999999999993e278

    1. Initial program 35.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. Simplified41.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \color{blue}{\left({k}^{-4} \cdot \frac{2}{t}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. log-prod36.2%

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

        \[\leadsto e^{\color{blue}{-4 \cdot \log k} + \log \left(\frac{2}{t}\right)} \cdot \left(\ell \cdot \ell\right) \]
    10. Applied egg-rr15.9%

      \[\leadsto e^{\color{blue}{-4 \cdot \log k + \log \left(\frac{2}{t}\right)}} \cdot \left(\ell \cdot \ell\right) \]

    if 1.99999999999999993e278 < (*.f64 l l)

    1. Initial program 28.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. Simplified28.6%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod27.2%

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

        \[\leadsto \frac{2}{\log \left({\left(e^{{t}^{3}}\right)}^{\color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}\right)}}\right)} \cdot \left(\ell \cdot \ell\right) \]
      4. *-commutative27.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{\log 1}} \]
      2. pow229.3%

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{\log 1} \]
      3. metadata-eval29.3%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{0}} \]
    8. Applied egg-rr29.3%

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{0}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification19.4%

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

Alternative 8: 73.6% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\frac{2}{{k\_m}^{2} \cdot \left(t\_m \cdot \left(\sin k\_m \cdot \tan k\_m\right)\right)} \cdot \left(\ell \cdot \ell\right)\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* (/ 2.0 (* (pow k_m 2.0) (* t_m (* (sin k_m) (tan k_m))))) (* l l))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((2.0 / (pow(k_m, 2.0) * (t_m * (sin(k_m) * tan(k_m))))) * (l * l));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * ((2.0d0 / ((k_m ** 2.0d0) * (t_m * (sin(k_m) * tan(k_m))))) * (l * l))
end function
k_m = Math.abs(k);
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_m) {
	return t_s * ((2.0 / (Math.pow(k_m, 2.0) * (t_m * (Math.sin(k_m) * Math.tan(k_m))))) * (l * l));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * ((2.0 / (math.pow(k_m, 2.0) * (t_m * (math.sin(k_m) * math.tan(k_m))))) * (l * l))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(Float64(2.0 / Float64((k_m ^ 2.0) * Float64(t_m * Float64(sin(k_m) * tan(k_m))))) * Float64(l * l)))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * ((2.0 / ((k_m ^ 2.0) * (t_m * (sin(k_m) * tan(k_m))))) * (l * l));
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[(N[(2.0 / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\frac{2}{{k\_m}^{2} \cdot \left(t\_m \cdot \left(\sin k\_m \cdot \tan k\_m\right)\right)} \cdot \left(\ell \cdot \ell\right)\right)
\end{array}
Derivation
  1. Initial program 33.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. Simplified37.9%

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

      \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    2. exp-prod32.0%

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

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

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

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

    \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left(\tan k \cdot \left(\sin k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
  6. Taylor expanded in k around inf 75.6%

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

Alternative 9: 73.6% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{\left(\sin k\_m \cdot \tan k\_m\right) \cdot \left({k\_m}^{2} \cdot t\_m\right)}\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* (* l l) (/ 2.0 (* (* (sin k_m) (tan k_m)) (* (pow k_m 2.0) t_m))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * (2.0 / ((sin(k_m) * tan(k_m)) * (pow(k_m, 2.0) * t_m))));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * ((l * l) * (2.0d0 / ((sin(k_m) * tan(k_m)) * ((k_m ** 2.0d0) * t_m))))
end function
k_m = Math.abs(k);
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_m) {
	return t_s * ((l * l) * (2.0 / ((Math.sin(k_m) * Math.tan(k_m)) * (Math.pow(k_m, 2.0) * t_m))));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * ((l * l) * (2.0 / ((math.sin(k_m) * math.tan(k_m)) * (math.pow(k_m, 2.0) * t_m))))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 / Float64(Float64(sin(k_m) * tan(k_m)) * Float64((k_m ^ 2.0) * t_m)))))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * ((l * l) * (2.0 / ((sin(k_m) * tan(k_m)) * ((k_m ^ 2.0) * t_m))));
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k$95$m, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{\left(\sin k\_m \cdot \tan k\_m\right) \cdot \left({k\_m}^{2} \cdot t\_m\right)}\right)
\end{array}
Derivation
  1. Initial program 33.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. Simplified37.9%

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

      \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    2. exp-prod32.0%

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

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

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

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

    \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left(\tan k \cdot \left(\sin k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
  6. Taylor expanded in k around inf 75.6%

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

      \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot \left(\sin k \cdot \tan k\right)}} \cdot \left(\ell \cdot \ell\right) \]
    2. *-commutative75.6%

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

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

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

Alternative 10: 65.2% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left({k\_m}^{-2} \cdot {\ell}^{2}\right) \cdot \frac{\frac{2}{{k\_m}^{2}}}{t\_m}\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* (* (pow k_m -2.0) (pow l 2.0)) (/ (/ 2.0 (pow k_m 2.0)) t_m))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((pow(k_m, -2.0) * pow(l, 2.0)) * ((2.0 / pow(k_m, 2.0)) / t_m));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * (((k_m ** (-2.0d0)) * (l ** 2.0d0)) * ((2.0d0 / (k_m ** 2.0d0)) / t_m))
end function
k_m = Math.abs(k);
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_m) {
	return t_s * ((Math.pow(k_m, -2.0) * Math.pow(l, 2.0)) * ((2.0 / Math.pow(k_m, 2.0)) / t_m));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * ((math.pow(k_m, -2.0) * math.pow(l, 2.0)) * ((2.0 / math.pow(k_m, 2.0)) / t_m))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(Float64((k_m ^ -2.0) * (l ^ 2.0)) * Float64(Float64(2.0 / (k_m ^ 2.0)) / t_m)))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * (((k_m ^ -2.0) * (l ^ 2.0)) * ((2.0 / (k_m ^ 2.0)) / t_m));
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[(N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left({k\_m}^{-2} \cdot {\ell}^{2}\right) \cdot \frac{\frac{2}{{k\_m}^{2}}}{t\_m}\right)
\end{array}
Derivation
  1. Initial program 33.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. Simplified37.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2}}}{t}} \cdot \left({\ell}^{2} \cdot {k}^{-2}\right) \]
  15. Final simplification68.1%

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

Alternative 11: 63.4% accurate, 3.2× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{+278}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{{k\_m}^{4} \cdot \left(t\_m + \left(k\_m \cdot k\_m\right) \cdot \left(0.08611111111111111 \cdot \left(t\_m \cdot \left(k\_m \cdot k\_m\right)\right) + t\_m \cdot 0.16666666666666666\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= (* l l) 2e+278)
    (*
     (* l l)
     (/
      2.0
      (*
       (pow k_m 4.0)
       (+
        t_m
        (*
         (* k_m k_m)
         (+
          (* 0.08611111111111111 (* t_m (* k_m k_m)))
          (* t_m 0.16666666666666666)))))))
    (/ (* 2.0 (pow l 2.0)) 0.0))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if ((l * l) <= 2e+278) {
		tmp = (l * l) * (2.0 / (pow(k_m, 4.0) * (t_m + ((k_m * k_m) * ((0.08611111111111111 * (t_m * (k_m * k_m))) + (t_m * 0.16666666666666666))))));
	} else {
		tmp = (2.0 * pow(l, 2.0)) / 0.0;
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if ((l * l) <= 2d+278) then
        tmp = (l * l) * (2.0d0 / ((k_m ** 4.0d0) * (t_m + ((k_m * k_m) * ((0.08611111111111111d0 * (t_m * (k_m * k_m))) + (t_m * 0.16666666666666666d0))))))
    else
        tmp = (2.0d0 * (l ** 2.0d0)) / 0.0d0
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if ((l * l) <= 2e+278) {
		tmp = (l * l) * (2.0 / (Math.pow(k_m, 4.0) * (t_m + ((k_m * k_m) * ((0.08611111111111111 * (t_m * (k_m * k_m))) + (t_m * 0.16666666666666666))))));
	} else {
		tmp = (2.0 * Math.pow(l, 2.0)) / 0.0;
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if (l * l) <= 2e+278:
		tmp = (l * l) * (2.0 / (math.pow(k_m, 4.0) * (t_m + ((k_m * k_m) * ((0.08611111111111111 * (t_m * (k_m * k_m))) + (t_m * 0.16666666666666666))))))
	else:
		tmp = (2.0 * math.pow(l, 2.0)) / 0.0
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (Float64(l * l) <= 2e+278)
		tmp = Float64(Float64(l * l) * Float64(2.0 / Float64((k_m ^ 4.0) * Float64(t_m + Float64(Float64(k_m * k_m) * Float64(Float64(0.08611111111111111 * Float64(t_m * Float64(k_m * k_m))) + Float64(t_m * 0.16666666666666666)))))));
	else
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / 0.0);
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if ((l * l) <= 2e+278)
		tmp = (l * l) * (2.0 / ((k_m ^ 4.0) * (t_m + ((k_m * k_m) * ((0.08611111111111111 * (t_m * (k_m * k_m))) + (t_m * 0.16666666666666666))))));
	else
		tmp = (2.0 * (l ^ 2.0)) / 0.0;
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e+278], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k$95$m, 4.0], $MachinePrecision] * N[(t$95$m + N[(N[(k$95$m * k$95$m), $MachinePrecision] * N[(N[(0.08611111111111111 * N[(t$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / 0.0), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 l l) < 1.99999999999999993e278

    1. Initial program 35.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. Simplified41.2%

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

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

        \[\leadsto \frac{2}{{k}^{4} \cdot \left(t + {k}^{2} \cdot \left(0.08611111111111111 \cdot \left(\color{blue}{\left(k \cdot k\right)} \cdot t\right) + 0.16666666666666666 \cdot t\right)\right)} \cdot \left(\ell \cdot \ell\right) \]
    6. Applied egg-rr71.1%

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

        \[\leadsto \frac{2}{{k}^{4} \cdot \left(t + {k}^{2} \cdot \left(0.08611111111111111 \cdot \left(\color{blue}{\left(k \cdot k\right)} \cdot t\right) + 0.16666666666666666 \cdot t\right)\right)} \cdot \left(\ell \cdot \ell\right) \]
    8. Applied egg-rr71.1%

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

    if 1.99999999999999993e278 < (*.f64 l l)

    1. Initial program 28.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. Simplified28.6%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod27.2%

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

        \[\leadsto \frac{2}{\log \left({\left(e^{{t}^{3}}\right)}^{\color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}\right)}}\right)} \cdot \left(\ell \cdot \ell\right) \]
      4. *-commutative27.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{\log 1}} \]
      2. pow229.3%

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{\log 1} \]
      3. metadata-eval29.3%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{0}} \]
    8. Applied egg-rr29.3%

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{0}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.1%

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

Alternative 12: 63.4% accurate, 3.6× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 l l) < 1.99999999999999993e278

    1. Initial program 35.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. Simplified41.2%

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

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

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

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

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

    if 1.99999999999999993e278 < (*.f64 l l)

    1. Initial program 28.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. Simplified28.6%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod27.2%

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

        \[\leadsto \frac{2}{\log \left({\left(e^{{t}^{3}}\right)}^{\color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}\right)}}\right)} \cdot \left(\ell \cdot \ell\right) \]
      4. *-commutative27.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{\log 1}} \]
      2. pow229.3%

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{\log 1} \]
      3. metadata-eval29.3%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{0}} \]
    8. Applied egg-rr29.3%

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{0}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.0%

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

Alternative 13: 62.9% accurate, 3.7× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 6.8 \cdot 10^{+145}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot {k\_m}^{-4}}{t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= l 6.8e+145)
    (* (* l l) (/ (* 2.0 (pow k_m -4.0)) t_m))
    (/ (* 2.0 (pow l 2.0)) 0.0))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (l <= 6.8e+145) {
		tmp = (l * l) * ((2.0 * pow(k_m, -4.0)) / t_m);
	} else {
		tmp = (2.0 * pow(l, 2.0)) / 0.0;
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (l <= 6.8d+145) then
        tmp = (l * l) * ((2.0d0 * (k_m ** (-4.0d0))) / t_m)
    else
        tmp = (2.0d0 * (l ** 2.0d0)) / 0.0d0
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (l <= 6.8e+145) {
		tmp = (l * l) * ((2.0 * Math.pow(k_m, -4.0)) / t_m);
	} else {
		tmp = (2.0 * Math.pow(l, 2.0)) / 0.0;
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if l <= 6.8e+145:
		tmp = (l * l) * ((2.0 * math.pow(k_m, -4.0)) / t_m)
	else:
		tmp = (2.0 * math.pow(l, 2.0)) / 0.0
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (l <= 6.8e+145)
		tmp = Float64(Float64(l * l) * Float64(Float64(2.0 * (k_m ^ -4.0)) / t_m));
	else
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / 0.0);
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (l <= 6.8e+145)
		tmp = (l * l) * ((2.0 * (k_m ^ -4.0)) / t_m);
	else
		tmp = (2.0 * (l ^ 2.0)) / 0.0;
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[l, 6.8e+145], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Power[k$95$m, -4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / 0.0), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 6.7999999999999998e145

    1. Initial program 34.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified39.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\log \left(\frac{2}{t} \cdot {k}^{-4}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    9. Step-by-step derivation
      1. rem-exp-log66.7%

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

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

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

    if 6.7999999999999998e145 < l

    1. Initial program 32.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. Simplified32.0%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod29.5%

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

        \[\leadsto \frac{2}{\log \left({\left(e^{{t}^{3}}\right)}^{\color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}\right)}}\right)} \cdot \left(\ell \cdot \ell\right) \]
      4. *-commutative29.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{\log 1}} \]
      2. pow232.7%

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{\log 1} \]
      3. metadata-eval32.7%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{0}} \]
    8. Applied egg-rr32.7%

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{0}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.2%

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

Alternative 14: 58.5% accurate, 3.7× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 1.75 \cdot 10^{+146}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{23.225806451612904}{t\_m \cdot {k\_m}^{8}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= l 1.75e+146)
    (* (* l l) (/ 23.225806451612904 (* t_m (pow k_m 8.0))))
    (/ (* 2.0 (pow l 2.0)) 0.0))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (l <= 1.75e+146) {
		tmp = (l * l) * (23.225806451612904 / (t_m * pow(k_m, 8.0)));
	} else {
		tmp = (2.0 * pow(l, 2.0)) / 0.0;
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (l <= 1.75d+146) then
        tmp = (l * l) * (23.225806451612904d0 / (t_m * (k_m ** 8.0d0)))
    else
        tmp = (2.0d0 * (l ** 2.0d0)) / 0.0d0
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (l <= 1.75e+146) {
		tmp = (l * l) * (23.225806451612904 / (t_m * Math.pow(k_m, 8.0)));
	} else {
		tmp = (2.0 * Math.pow(l, 2.0)) / 0.0;
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if l <= 1.75e+146:
		tmp = (l * l) * (23.225806451612904 / (t_m * math.pow(k_m, 8.0)))
	else:
		tmp = (2.0 * math.pow(l, 2.0)) / 0.0
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (l <= 1.75e+146)
		tmp = Float64(Float64(l * l) * Float64(23.225806451612904 / Float64(t_m * (k_m ^ 8.0))));
	else
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / 0.0);
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (l <= 1.75e+146)
		tmp = (l * l) * (23.225806451612904 / (t_m * (k_m ^ 8.0)));
	else
		tmp = (2.0 * (l ^ 2.0)) / 0.0;
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[l, 1.75e+146], N[(N[(l * l), $MachinePrecision] * N[(23.225806451612904 / N[(t$95$m * N[Power[k$95$m, 8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / 0.0), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.7500000000000001e146

    1. Initial program 34.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified39.0%

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

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t + {k}^{2} \cdot \left(0.08611111111111111 \cdot \left({k}^{2} \cdot t\right) + 0.16666666666666666 \cdot t\right)\right)}} \cdot \left(\ell \cdot \ell\right) \]
    5. Taylor expanded in k around inf 60.9%

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

    if 1.7500000000000001e146 < l

    1. Initial program 32.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. Simplified32.0%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod29.5%

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

        \[\leadsto \frac{2}{\log \left({\left(e^{{t}^{3}}\right)}^{\color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}\right)}}\right)} \cdot \left(\ell \cdot \ell\right) \]
      4. *-commutative29.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{\log 1}} \]
      2. pow232.7%

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{\log 1} \]
      3. metadata-eval32.7%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{0}} \]
    8. Applied egg-rr32.7%

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{0}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.3%

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

Alternative 15: 56.7% accurate, 3.8× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 1.15 \cdot 10^{-6}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (if (<= k_m 1.15e-6) (/ (* 2.0 (pow l 2.0)) 0.0) 0.0)))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 1.15e-6) {
		tmp = (2.0 * pow(l, 2.0)) / 0.0;
	} else {
		tmp = 0.0;
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 1.15d-6) then
        tmp = (2.0d0 * (l ** 2.0d0)) / 0.0d0
    else
        tmp = 0.0d0
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (k_m <= 1.15e-6) {
		tmp = (2.0 * Math.pow(l, 2.0)) / 0.0;
	} else {
		tmp = 0.0;
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 1.15e-6:
		tmp = (2.0 * math.pow(l, 2.0)) / 0.0
	else:
		tmp = 0.0
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 1.15e-6)
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / 0.0);
	else
		tmp = 0.0;
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 1.15e-6)
		tmp = (2.0 * (l ^ 2.0)) / 0.0;
	else
		tmp = 0.0;
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 1.15e-6], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / 0.0), $MachinePrecision], 0.0]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 1.15 \cdot 10^{-6}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{0}\\

\mathbf{else}:\\
\;\;\;\;0\\


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

    1. Initial program 33.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. Simplified36.6%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod30.7%

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

        \[\leadsto \frac{2}{\log \left({\left(e^{{t}^{3}}\right)}^{\color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}\right)}}\right)} \cdot \left(\ell \cdot \ell\right) \]
      4. *-commutative30.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{\log 1}} \]
      2. pow225.6%

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{\log 1} \]
      3. metadata-eval25.6%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{0}} \]
    8. Applied egg-rr25.6%

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{0}} \]

    if 1.15e-6 < k

    1. Initial program 33.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. Simplified41.7%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod36.1%

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

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

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

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

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

      \[\leadsto \frac{2}{\log \color{blue}{1}} \cdot \left(\ell \cdot \ell\right) \]
    7. Step-by-step derivation
      1. clear-num10.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{\log 1}{2}}} \cdot \left(\ell \cdot \ell\right) \]
      2. metadata-eval10.6%

        \[\leadsto \frac{1}{\frac{\color{blue}{0}}{2}} \cdot \left(\ell \cdot \ell\right) \]
      3. metadata-eval10.6%

        \[\leadsto \frac{1}{\color{blue}{0}} \cdot \left(\ell \cdot \ell\right) \]
      4. metadata-eval10.6%

        \[\leadsto \frac{1}{\color{blue}{\log 1}} \cdot \left(\ell \cdot \ell\right) \]
      5. inv-pow10.6%

        \[\leadsto \color{blue}{{\log 1}^{-1}} \cdot \left(\ell \cdot \ell\right) \]
      6. metadata-eval10.6%

        \[\leadsto {\color{blue}{0}}^{-1} \cdot \left(\ell \cdot \ell\right) \]
    8. Applied egg-rr10.6%

      \[\leadsto \color{blue}{{0}^{-1}} \cdot \left(\ell \cdot \ell\right) \]
    9. Step-by-step derivation
      1. pow-base-055.5%

        \[\leadsto \color{blue}{0} \cdot \left(\ell \cdot \ell\right) \]
    10. Simplified55.5%

      \[\leadsto \color{blue}{0} \cdot \left(\ell \cdot \ell\right) \]
    11. Taylor expanded in l around 0 56.0%

      \[\leadsto \color{blue}{0} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 28.3% accurate, 35.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 3.3 \cdot 10^{+131}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-2}{0}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (if (<= l 3.3e+131) 0.0 (* (* l l) (/ -2.0 0.0)))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (l <= 3.3e+131) {
		tmp = 0.0;
	} else {
		tmp = (l * l) * (-2.0 / 0.0);
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (l <= 3.3d+131) then
        tmp = 0.0d0
    else
        tmp = (l * l) * ((-2.0d0) / 0.0d0)
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (l <= 3.3e+131) {
		tmp = 0.0;
	} else {
		tmp = (l * l) * (-2.0 / 0.0);
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if l <= 3.3e+131:
		tmp = 0.0
	else:
		tmp = (l * l) * (-2.0 / 0.0)
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (l <= 3.3e+131)
		tmp = 0.0;
	else
		tmp = Float64(Float64(l * l) * Float64(-2.0 / 0.0));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (l <= 3.3e+131)
		tmp = 0.0;
	else
		tmp = (l * l) * (-2.0 / 0.0);
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[l, 3.3e+131], 0.0, N[(N[(l * l), $MachinePrecision] * N[(-2.0 / 0.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 3.3 \cdot 10^{+131}:\\
\;\;\;\;0\\

\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-2}{0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 3.2999999999999998e131

    1. Initial program 34.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. Simplified39.2%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod32.1%

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

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

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

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

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

      \[\leadsto \frac{2}{\log \color{blue}{1}} \cdot \left(\ell \cdot \ell\right) \]
    7. Step-by-step derivation
      1. clear-num19.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{\log 1}{2}}} \cdot \left(\ell \cdot \ell\right) \]
      2. metadata-eval19.3%

        \[\leadsto \frac{1}{\frac{\color{blue}{0}}{2}} \cdot \left(\ell \cdot \ell\right) \]
      3. metadata-eval19.3%

        \[\leadsto \frac{1}{\color{blue}{0}} \cdot \left(\ell \cdot \ell\right) \]
      4. metadata-eval19.3%

        \[\leadsto \frac{1}{\color{blue}{\log 1}} \cdot \left(\ell \cdot \ell\right) \]
      5. inv-pow19.3%

        \[\leadsto \color{blue}{{\log 1}^{-1}} \cdot \left(\ell \cdot \ell\right) \]
      6. metadata-eval19.3%

        \[\leadsto {\color{blue}{0}}^{-1} \cdot \left(\ell \cdot \ell\right) \]
    8. Applied egg-rr19.3%

      \[\leadsto \color{blue}{{0}^{-1}} \cdot \left(\ell \cdot \ell\right) \]
    9. Step-by-step derivation
      1. pow-base-032.5%

        \[\leadsto \color{blue}{0} \cdot \left(\ell \cdot \ell\right) \]
    10. Simplified32.5%

      \[\leadsto \color{blue}{0} \cdot \left(\ell \cdot \ell\right) \]
    11. Taylor expanded in l around 0 32.8%

      \[\leadsto \color{blue}{0} \]

    if 3.2999999999999998e131 < l

    1. Initial program 31.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. Simplified31.7%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod31.5%

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

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

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

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

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

      \[\leadsto \frac{2}{\log \color{blue}{1}} \cdot \left(\ell \cdot \ell\right) \]
    7. Step-by-step derivation
      1. *-un-lft-identity34.3%

        \[\leadsto \color{blue}{\left(1 \cdot \frac{2}{\log 1}\right)} \cdot \left(\ell \cdot \ell\right) \]
      2. frac-2neg34.3%

        \[\leadsto \left(1 \cdot \color{blue}{\frac{-2}{-\log 1}}\right) \cdot \left(\ell \cdot \ell\right) \]
      3. metadata-eval34.3%

        \[\leadsto \left(1 \cdot \frac{\color{blue}{-2}}{-\log 1}\right) \cdot \left(\ell \cdot \ell\right) \]
      4. metadata-eval34.3%

        \[\leadsto \left(1 \cdot \frac{-2}{-\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
      5. metadata-eval31.9%

        \[\leadsto \left(1 \cdot \frac{-2}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    8. Applied egg-rr31.9%

      \[\leadsto \color{blue}{\left(1 \cdot \frac{-2}{0}\right)} \cdot \left(\ell \cdot \ell\right) \]
    9. Step-by-step derivation
      1. *-lft-identity31.9%

        \[\leadsto \color{blue}{\frac{-2}{0}} \cdot \left(\ell \cdot \ell\right) \]
    10. Simplified31.9%

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

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

Alternative 17: 27.9% accurate, 421.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot 0 \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m) :precision binary64 (* t_s 0.0))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * 0.0;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * 0.0d0
end function
k_m = Math.abs(k);
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_m) {
	return t_s * 0.0;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * 0.0
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * 0.0)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * 0.0;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * 0.0), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot 0
\end{array}
Derivation
  1. Initial program 33.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. Simplified37.9%

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

      \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    2. exp-prod32.0%

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

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

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

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

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

    \[\leadsto \frac{2}{\log \color{blue}{1}} \cdot \left(\ell \cdot \ell\right) \]
  7. Step-by-step derivation
    1. clear-num21.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{\log 1}{2}}} \cdot \left(\ell \cdot \ell\right) \]
    2. metadata-eval21.9%

      \[\leadsto \frac{1}{\frac{\color{blue}{0}}{2}} \cdot \left(\ell \cdot \ell\right) \]
    3. metadata-eval21.9%

      \[\leadsto \frac{1}{\color{blue}{0}} \cdot \left(\ell \cdot \ell\right) \]
    4. metadata-eval21.9%

      \[\leadsto \frac{1}{\color{blue}{\log 1}} \cdot \left(\ell \cdot \ell\right) \]
    5. inv-pow21.9%

      \[\leadsto \color{blue}{{\log 1}^{-1}} \cdot \left(\ell \cdot \ell\right) \]
    6. metadata-eval21.9%

      \[\leadsto {\color{blue}{0}}^{-1} \cdot \left(\ell \cdot \ell\right) \]
  8. Applied egg-rr21.9%

    \[\leadsto \color{blue}{{0}^{-1}} \cdot \left(\ell \cdot \ell\right) \]
  9. Step-by-step derivation
    1. pow-base-026.9%

      \[\leadsto \color{blue}{0} \cdot \left(\ell \cdot \ell\right) \]
  10. Simplified26.9%

    \[\leadsto \color{blue}{0} \cdot \left(\ell \cdot \ell\right) \]
  11. Taylor expanded in l around 0 27.4%

    \[\leadsto \color{blue}{0} \]
  12. Add Preprocessing

Reproduce

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