Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.6% → 88.9%
Time: 17.7s
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.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
	return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k):
	return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}

Alternative 1: 88.9% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_2 := \frac{\sqrt{2}}{k}\\
t_3 := {\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k \cdot \tan k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 4 \cdot 10^{-263}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}}\right)}^{3}\\

\mathbf{elif}\;\ell \cdot \ell \leq 10^{+230}:\\
\;\;\;\;-2 \cdot \frac{\frac{\frac{\cos k}{t\_m}}{{\sin k}^{2}} \cdot \left(-{\ell}^{2}\right)}{{k}^{2}}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 l l) < 4e-263

    1. Initial program 23.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. Simplified23.0%

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

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

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

    if 4e-263 < (*.f64 l l) < 1.0000000000000001e230

    1. Initial program 36.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2} + 0}}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\sin k \cdot \tan k\right)} \]
    7. Taylor expanded in t around -inf 0.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \frac{{\ell}^{2} \cdot \color{blue}{\frac{\frac{\cos k}{t}}{-1 \cdot {\sin k}^{2}}}}{{k}^{2}} \]
      5. mul-1-neg93.5%

        \[\leadsto -2 \cdot \frac{{\ell}^{2} \cdot \frac{\frac{\cos k}{t}}{\color{blue}{-{\sin k}^{2}}}}{{k}^{2}} \]
    11. Applied egg-rr93.5%

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

    if 1.0000000000000001e230 < (*.f64 l l)

    1. Initial program 40.7%

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

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

      \[\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}}} \]
    5. Step-by-step derivation
      1. associate-/r/82.0%

        \[\leadsto \frac{\color{blue}{\frac{\sqrt{2}}{k} \cdot 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}} \]
      2. associate-/r*82.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.3% accurate, 0.7× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 4 \cdot 10^{-263}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}}\right)}^{3}\\

\mathbf{elif}\;\ell \cdot \ell \leq 10^{+230}:\\
\;\;\;\;-2 \cdot \frac{\frac{\frac{\cos k}{t\_m}}{{\sin k}^{2}} \cdot \left(-{\ell}^{2}\right)}{{k}^{2}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 l l) < 4e-263

    1. Initial program 23.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. Simplified23.0%

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

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

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

    if 4e-263 < (*.f64 l l) < 1.0000000000000001e230

    1. Initial program 36.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2} + 0}}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\sin k \cdot \tan k\right)} \]
    7. Taylor expanded in t around -inf 0.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \frac{{\ell}^{2} \cdot \color{blue}{\frac{\frac{\cos k}{t}}{-1 \cdot {\sin k}^{2}}}}{{k}^{2}} \]
      5. mul-1-neg93.5%

        \[\leadsto -2 \cdot \frac{{\ell}^{2} \cdot \frac{\frac{\cos k}{t}}{\color{blue}{-{\sin k}^{2}}}}{{k}^{2}} \]
    11. Applied egg-rr93.5%

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

    if 1.0000000000000001e230 < (*.f64 l l)

    1. Initial program 40.7%

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

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

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

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

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

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

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

Alternative 3: 77.6% accurate, 0.8× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 5.1 \cdot 10^{-132}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}}\right)}^{3}\\

\mathbf{elif}\;\ell \leq 1.06 \cdot 10^{+160}:\\
\;\;\;\;-2 \cdot \frac{\frac{\frac{\cos k}{t\_m}}{{\sin k}^{2}} \cdot \left(-{\ell}^{2}\right)}{{k}^{2}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 5.10000000000000005e-132

    1. Initial program 30.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. Simplified30.9%

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

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

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

    if 5.10000000000000005e-132 < l < 1.0599999999999999e160

    1. Initial program 32.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Step-by-step derivation
      1. *-commutative32.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2} + 0}}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\sin k \cdot \tan k\right)} \]
    7. Taylor expanded in t around -inf 0.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \frac{{\ell}^{2} \cdot \color{blue}{\frac{\frac{\cos k}{t}}{-1 \cdot {\sin k}^{2}}}}{{k}^{2}} \]
      5. mul-1-neg89.8%

        \[\leadsto -2 \cdot \frac{{\ell}^{2} \cdot \frac{\frac{\cos k}{t}}{\color{blue}{-{\sin k}^{2}}}}{{k}^{2}} \]
    11. Applied egg-rr89.8%

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

    if 1.0599999999999999e160 < l

    1. Initial program 52.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. Simplified52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 78.5% accurate, 0.8× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.4 \cdot 10^{-6}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}}\right)}^{3}\\

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


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

    1. Initial program 36.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. Simplified36.2%

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

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

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

    if 1.39999999999999994e-6 < k

    1. Initial program 25.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. Step-by-step derivation
      1. *-commutative25.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2} + 0}}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\sin k \cdot \tan k\right)} \]
    7. Taylor expanded in t around -inf 0.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \frac{{\ell}^{2} \cdot \color{blue}{\frac{\frac{\cos k}{t}}{-1 \cdot {\sin k}^{2}}}}{{k}^{2}} \]
      5. mul-1-neg73.4%

        \[\leadsto -2 \cdot \frac{{\ell}^{2} \cdot \frac{\frac{\cos k}{t}}{\color{blue}{-{\sin k}^{2}}}}{{k}^{2}} \]
    11. Applied egg-rr73.4%

      \[\leadsto -2 \cdot \color{blue}{\frac{{\ell}^{2} \cdot \frac{\frac{\cos k}{t}}{-{\sin k}^{2}}}{{k}^{2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.9%

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

Alternative 5: 78.5% accurate, 0.8× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.5 \cdot 10^{-5}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}}\right)}^{3}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \frac{t\_m \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\


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

    1. Initial program 36.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. Simplified36.2%

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

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

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

    if 2.50000000000000012e-5 < k

    1. Initial program 25.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. Simplified25.5%

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

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

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

        \[\leadsto \frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left({\left(\frac{k}{t}\right)}^{2} - \color{blue}{0}\right)} \]
      4. --rgt-identity40.6%

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

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

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

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

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

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

Alternative 6: 78.5% accurate, 0.8× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.45 \cdot 10^{-6}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}}\right)}^{3}\\

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


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

    1. Initial program 36.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. Simplified36.2%

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

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

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

    if 1.4500000000000001e-6 < k

    1. Initial program 25.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. Simplified39.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. Taylor expanded in t around 0 70.8%

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

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

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

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

Alternative 7: 65.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.90000000000000006e-195

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.90000000000000006e-195 < l

    1. Initial program 36.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified43.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. Taylor expanded in t around 0 79.8%

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

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

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

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

Alternative 8: 65.5% accurate, 1.0× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 3.3 \cdot 10^{-195}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) \cdot \left(\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 3.3e-195

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3e-195 < l

    1. Initial program 36.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified43.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. Taylor expanded in t around 0 79.8%

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

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

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

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

Alternative 9: 62.2% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.3000000000000002e-195

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2} + 0}}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\sin k \cdot \tan k\right)} \]
    7. Step-by-step derivation
      1. clear-num24.2%

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

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

      \[\leadsto \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2} + 0}}{{\color{blue}{\left({\left(\frac{\ell}{{t}^{1.5}}\right)}^{-1}\right)}}^{2} \cdot \left(\sin k \cdot \tan k\right)} \]
    9. Step-by-step derivation
      1. unpow-124.2%

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

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

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

    if 2.3000000000000002e-195 < l

    1. Initial program 36.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified43.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. Taylor expanded in t around 0 79.8%

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

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

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

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

Alternative 10: 73.3% accurate, 1.0× speedup?

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

\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{\frac{{\sin k}^{2} \cdot \left({k}^{2} \cdot t\_m\right)}{\cos k}}\right)
\end{array}
Derivation
  1. Initial program 33.4%

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

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

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

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

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

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

Alternative 11: 73.3% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(\cos k \cdot \frac{2}{{\sin k}^{2} \cdot \left({k}^{2} \cdot t\_m\right)}\right)\right) \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (* (* l l) (* (cos k) (/ 2.0 (* (pow (sin k) 2.0) (* (pow k 2.0) t_m)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * ((l * l) * (cos(k) * (2.0 / (pow(sin(k), 2.0) * (pow(k, 2.0) * t_m)))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * ((l * l) * (cos(k) * (2.0d0 / ((sin(k) ** 2.0d0) * ((k ** 2.0d0) * t_m)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * ((l * l) * (Math.cos(k) * (2.0 / (Math.pow(Math.sin(k), 2.0) * (Math.pow(k, 2.0) * t_m)))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * ((l * l) * (math.cos(k) * (2.0 / (math.pow(math.sin(k), 2.0) * (math.pow(k, 2.0) * t_m)))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(Float64(l * l) * Float64(cos(k) * Float64(2.0 / Float64((sin(k) ^ 2.0) * Float64((k ^ 2.0) * t_m))))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * ((l * l) * (cos(k) * (2.0 / ((sin(k) ^ 2.0) * ((k ^ 2.0) * t_m)))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[(2.0 / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(\cos k \cdot \frac{2}{{\sin k}^{2} \cdot \left({k}^{2} \cdot t\_m\right)}\right)\right)
\end{array}
Derivation
  1. Initial program 33.4%

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

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

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

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

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

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

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

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

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

Alternative 12: 69.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_2 := {k}^{2} \cdot t\_m\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 0.000108:\\
\;\;\;\;-2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{-1}{t\_2}\right)\\

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


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

    1. Initial program 35.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. Step-by-step derivation
      1. *-commutative35.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2} + 0}}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\sin k \cdot \tan k\right)} \]
    7. Taylor expanded in t around -inf 0.0%

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

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

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

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

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

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

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

    if 1.08e-4 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 64.6% accurate, 1.3× speedup?

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

\\
t\_s \cdot \left(-2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{-1}{{k}^{2} \cdot t\_m}\right)\right)
\end{array}
Derivation
  1. Initial program 33.4%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
  2. Step-by-step derivation
    1. *-commutative33.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2} + 0}}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\sin k \cdot \tan k\right)} \]
  7. Taylor expanded in t around -inf 0.0%

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

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

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

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

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

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

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

Alternative 14: 61.9% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{{\ell}^{2} \cdot \left(2 \cdot {k}^{-4}\right)}{t\_m} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ (* (pow l 2.0) (* 2.0 (pow k -4.0))) t_m)))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * ((pow(l, 2.0) * (2.0 * pow(k, -4.0))) / t_m);
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (((l ** 2.0d0) * (2.0d0 * (k ** (-4.0d0)))) / t_m)
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * ((Math.pow(l, 2.0) * (2.0 * Math.pow(k, -4.0))) / t_m);
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * ((math.pow(l, 2.0) * (2.0 * math.pow(k, -4.0))) / t_m)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(Float64((l ^ 2.0) * Float64(2.0 * (k ^ -4.0))) / t_m))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (((l ^ 2.0) * (2.0 * (k ^ -4.0))) / t_m);
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{{\ell}^{2} \cdot \left(2 \cdot {k}^{-4}\right)}{t\_m}
\end{array}
Derivation
  1. Initial program 33.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 61.0% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{t\_m}}{{k}^{4}}\right) \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* 2.0 (/ (/ (pow l 2.0) t_m) (pow k 4.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * ((pow(l, 2.0) / t_m) / pow(k, 4.0)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * (((l ** 2.0d0) / t_m) / (k ** 4.0d0)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * ((Math.pow(l, 2.0) / t_m) / Math.pow(k, 4.0)));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 * ((math.pow(l, 2.0) / t_m) / math.pow(k, 4.0)))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k ^ 4.0))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * (((l ^ 2.0) / t_m) / (k ^ 4.0)));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{t\_m}}{{k}^{4}}\right)
\end{array}
Derivation
  1. Initial program 33.4%

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

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

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

      \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    2. associate-/r*64.4%

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

    \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
  7. Add Preprocessing

Alternative 16: 61.9% accurate, 3.8× speedup?

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

\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{t\_m \cdot {k}^{4}}\right)
\end{array}
Derivation
  1. Initial program 33.4%

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

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

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

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

Alternative 17: 61.9% accurate, 3.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \left({k}^{-4} \cdot \frac{2}{t\_m}\right)\right) \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* (* l l) (* (pow k -4.0) (/ 2.0 t_m)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * ((l * l) * (pow(k, -4.0) * (2.0 / t_m)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * ((l * l) * ((k ** (-4.0d0)) * (2.0d0 / t_m)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * ((l * l) * (Math.pow(k, -4.0) * (2.0 / t_m)));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * ((l * l) * (math.pow(k, -4.0) * (2.0 / t_m)))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(Float64(l * l) * Float64((k ^ -4.0) * Float64(2.0 / t_m))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * ((l * l) * ((k ^ -4.0) * (2.0 / t_m)));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(N[Power[k, -4.0], $MachinePrecision] * N[(2.0 / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \left({k}^{-4} \cdot \frac{2}{t\_m}\right)\right)
\end{array}
Derivation
  1. Initial program 33.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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