Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.4% → 87.9%
Time: 28.0s
Alternatives: 15
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 15 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.4% 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: 87.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 := t\_m \cdot \frac{\sqrt{2}}{k}\\ t_3 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\ t_4 := \sin k \cdot \tan k\\ t_5 := \sqrt[3]{t\_4}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-108}:\\ \;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+264}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{{\left(k \cdot \sqrt{t\_m}\right)}^{2} \cdot t\_4}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2}{{\left(t\_3 \cdot t\_5\right)}^{2}} \cdot \frac{\frac{t\_2}{t\_3}}{t\_5}\\ \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 (* t_m (/ (sqrt 2.0) k)))
        (t_3 (/ t_m (pow (cbrt l) 2.0)))
        (t_4 (* (sin k) (tan k)))
        (t_5 (cbrt t_4)))
   (*
    t_s
    (if (<= (* l l) 2e-108)
      (pow (/ (* l (sqrt 2.0)) (* (pow k 2.0) (sqrt t_m))) 2.0)
      (if (<= (* l l) 5e+264)
        (* 2.0 (/ (pow l 2.0) (* (pow (* k (sqrt t_m)) 2.0) t_4)))
        (* (/ t_2 (pow (* t_3 t_5) 2.0)) (/ (/ t_2 t_3) t_5)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = t_m * (sqrt(2.0) / k);
	double t_3 = t_m / pow(cbrt(l), 2.0);
	double t_4 = sin(k) * tan(k);
	double t_5 = cbrt(t_4);
	double tmp;
	if ((l * l) <= 2e-108) {
		tmp = pow(((l * sqrt(2.0)) / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	} else if ((l * l) <= 5e+264) {
		tmp = 2.0 * (pow(l, 2.0) / (pow((k * sqrt(t_m)), 2.0) * t_4));
	} else {
		tmp = (t_2 / pow((t_3 * t_5), 2.0)) * ((t_2 / t_3) / t_5);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = t_m * (Math.sqrt(2.0) / k);
	double t_3 = t_m / Math.pow(Math.cbrt(l), 2.0);
	double t_4 = Math.sin(k) * Math.tan(k);
	double t_5 = Math.cbrt(t_4);
	double tmp;
	if ((l * l) <= 2e-108) {
		tmp = Math.pow(((l * Math.sqrt(2.0)) / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	} else if ((l * l) <= 5e+264) {
		tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow((k * Math.sqrt(t_m)), 2.0) * t_4));
	} else {
		tmp = (t_2 / Math.pow((t_3 * t_5), 2.0)) * ((t_2 / t_3) / t_5);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(t_m * Float64(sqrt(2.0) / k))
	t_3 = Float64(t_m / (cbrt(l) ^ 2.0))
	t_4 = Float64(sin(k) * tan(k))
	t_5 = cbrt(t_4)
	tmp = 0.0
	if (Float64(l * l) <= 2e-108)
		tmp = Float64(Float64(l * sqrt(2.0)) / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0;
	elseif (Float64(l * l) <= 5e+264)
		tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((Float64(k * sqrt(t_m)) ^ 2.0) * t_4)));
	else
		tmp = Float64(Float64(t_2 / (Float64(t_3 * t_5) ^ 2.0)) * Float64(Float64(t_2 / t_3) / t_5));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Power[t$95$4, 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-108], N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+264], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 / N[Power[N[(t$95$3 * t$95$5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$2 / t$95$3), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+264}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{\left(k \cdot \sqrt{t\_m}\right)}^{2} \cdot t\_4}\\

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


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

    1. Initial program 41.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. Simplified56.2%

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

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

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

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{{k}^{4} \cdot t} \]
      3. *-commutative72.3%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    6. Applied egg-rr72.3%

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

        \[\leadsto \color{blue}{\sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}}} \]
      2. pow257.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000008e-108 < (*.f64 l l) < 5.00000000000000033e264

    1. Initial program 34.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000033e264 < (*.f64 l l)

    1. Initial program 32.9%

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

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

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

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

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

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

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

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

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

        \[\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/79.1%

        \[\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}} \]
    8. Simplified79.1%

      \[\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}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.9%

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

Alternative 2: 87.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}\\ t_4 := \sin k \cdot \tan k\\ t_5 := \sqrt[3]{t\_4}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-108}:\\ \;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+264}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{{\left(k \cdot \sqrt{t\_m}\right)}^{2} \cdot t\_4}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_m \cdot t\_2}{{\left(\frac{t\_m}{t\_3} \cdot t\_5\right)}^{2}} \cdot \frac{t\_2 \cdot t\_3}{t\_5}\\ \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))
        (t_4 (* (sin k) (tan k)))
        (t_5 (cbrt t_4)))
   (*
    t_s
    (if (<= (* l l) 2e-108)
      (pow (/ (* l (sqrt 2.0)) (* (pow k 2.0) (sqrt t_m))) 2.0)
      (if (<= (* l l) 5e+264)
        (* 2.0 (/ (pow l 2.0) (* (pow (* k (sqrt t_m)) 2.0) t_4)))
        (*
         (/ (* t_m t_2) (pow (* (/ t_m t_3) t_5) 2.0))
         (/ (* t_2 t_3) t_5)))))))
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);
	double t_4 = sin(k) * tan(k);
	double t_5 = cbrt(t_4);
	double tmp;
	if ((l * l) <= 2e-108) {
		tmp = pow(((l * sqrt(2.0)) / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	} else if ((l * l) <= 5e+264) {
		tmp = 2.0 * (pow(l, 2.0) / (pow((k * sqrt(t_m)), 2.0) * t_4));
	} else {
		tmp = ((t_m * t_2) / pow(((t_m / t_3) * t_5), 2.0)) * ((t_2 * t_3) / t_5);
	}
	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);
	double t_4 = Math.sin(k) * Math.tan(k);
	double t_5 = Math.cbrt(t_4);
	double tmp;
	if ((l * l) <= 2e-108) {
		tmp = Math.pow(((l * Math.sqrt(2.0)) / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	} else if ((l * l) <= 5e+264) {
		tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow((k * Math.sqrt(t_m)), 2.0) * t_4));
	} else {
		tmp = ((t_m * t_2) / Math.pow(((t_m / t_3) * t_5), 2.0)) * ((t_2 * t_3) / t_5);
	}
	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 = cbrt(l) ^ 2.0
	t_4 = Float64(sin(k) * tan(k))
	t_5 = cbrt(t_4)
	tmp = 0.0
	if (Float64(l * l) <= 2e-108)
		tmp = Float64(Float64(l * sqrt(2.0)) / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0;
	elseif (Float64(l * l) <= 5e+264)
		tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((Float64(k * sqrt(t_m)) ^ 2.0) * t_4)));
	else
		tmp = Float64(Float64(Float64(t_m * t_2) / (Float64(Float64(t_m / t_3) * t_5) ^ 2.0)) * Float64(Float64(t_2 * t_3) / t_5));
	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[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Power[t$95$4, 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-108], N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+264], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$m * t$95$2), $MachinePrecision] / N[Power[N[(N[(t$95$m / t$95$3), $MachinePrecision] * t$95$5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$2 * t$95$3), $MachinePrecision] / t$95$5), $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}\\
t_4 := \sin k \cdot \tan k\\
t_5 := \sqrt[3]{t\_4}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-108}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\

\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+264}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{\left(k \cdot \sqrt{t\_m}\right)}^{2} \cdot t\_4}\\

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


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

    1. Initial program 41.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. Simplified56.2%

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

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

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

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{{k}^{4} \cdot t} \]
      3. *-commutative72.3%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    6. Applied egg-rr72.3%

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

        \[\leadsto \color{blue}{\sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}}} \]
      2. pow257.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000008e-108 < (*.f64 l l) < 5.00000000000000033e264

    1. Initial program 34.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000033e264 < (*.f64 l l)

    1. Initial program 32.9%

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

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

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

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

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

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

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

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

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

        \[\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/79.1%

        \[\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}} \]
    8. Simplified79.1%

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

        \[\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{\color{blue}{\frac{\frac{\sqrt{2}}{k} \cdot t}{t} \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{\sin k \cdot \tan k}} \]
    10. Applied egg-rr79.1%

      \[\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{\color{blue}{\frac{\frac{\sqrt{2}}{k} \cdot t}{t} \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{\sin k \cdot \tan k}} \]
    11. Step-by-step derivation
      1. associate-/l*79.1%

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

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

      \[\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{\color{blue}{\left(\frac{\sqrt{2}}{k} \cdot 1\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{\sin k \cdot \tan k}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.9%

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

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

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

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

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


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

    1. Initial program 41.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. Simplified56.2%

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

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

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

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{{k}^{4} \cdot t} \]
      3. *-commutative72.3%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    6. Applied egg-rr72.3%

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

        \[\leadsto \color{blue}{\sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}}} \]
      2. pow257.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000008e-108 < (*.f64 l l) < 5.00000000000000033e264

    1. Initial program 34.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000033e264 < (*.f64 l l)

    1. Initial program 32.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. Simplified36.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 38.5%

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

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

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

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

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{{k}^{4} \cdot t} \]
      3. *-commutative70.4%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    6. Applied egg-rr70.4%

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

        \[\leadsto \color{blue}{\sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}}} \]
      2. pow258.1%

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e-134 < (*.f64 l l) < 1.0000000000000001e235

    1. Initial program 41.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. Simplified54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e235 < (*.f64 l l)

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{\left({k}^{2} \cdot t\right) \cdot \left(\sin k \cdot \tan k\right)}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 84.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;\ell \cdot \ell \leq 10^{+235}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \ell}{t\_2 \cdot \left({k}^{2} \cdot t\_m\right)}\\

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


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

    1. Initial program 41.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. Simplified56.2%

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

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

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

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{{k}^{4} \cdot t} \]
      3. *-commutative72.3%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    6. Applied egg-rr72.3%

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

        \[\leadsto \color{blue}{\sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}}} \]
      2. pow257.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000008e-108 < (*.f64 l l) < 1.0000000000000001e235

    1. Initial program 36.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. Simplified51.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e235 < (*.f64 l l)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 41.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. Simplified56.2%

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

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

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

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{{k}^{4} \cdot t} \]
      3. *-commutative72.3%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    6. Applied egg-rr72.3%

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

        \[\leadsto \color{blue}{\sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}}} \]
      2. pow257.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000008e-108 < (*.f64 l l) < 1.0000000000000001e235

    1. Initial program 36.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. Simplified51.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e235 < (*.f64 l l)

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{\left({k}^{2} \cdot t\right) \cdot \left(\sin k \cdot \tan k\right)}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 78.1% accurate, 1.0× speedup?

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

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


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

    1. Initial program 37.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. Simplified50.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 k around 0 64.0%

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

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

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

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    6. Applied egg-rr64.3%

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

        \[\leadsto \color{blue}{\sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}}} \]
      2. sqrt-div31.1%

        \[\leadsto \color{blue}{\frac{\sqrt{2 \cdot {\ell}^{2}}}{\sqrt{t \cdot {k}^{4}}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
      3. sqrt-prod31.1%

        \[\leadsto \frac{\color{blue}{\sqrt{2} \cdot \sqrt{{\ell}^{2}}}}{\sqrt{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
      4. sqrt-pow120.8%

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

        \[\leadsto \frac{\sqrt{2} \cdot {\ell}^{\color{blue}{1}}}{\sqrt{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
      6. pow120.8%

        \[\leadsto \frac{\sqrt{2} \cdot \color{blue}{\ell}}{\sqrt{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
      7. *-commutative20.8%

        \[\leadsto \frac{\sqrt{2} \cdot \ell}{\sqrt{\color{blue}{{k}^{4} \cdot t}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
      8. sqrt-prod20.8%

        \[\leadsto \frac{\sqrt{2} \cdot \ell}{\color{blue}{\sqrt{{k}^{4}} \cdot \sqrt{t}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
      9. sqrt-pow120.8%

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

        \[\leadsto \frac{\sqrt{2} \cdot \ell}{{k}^{\color{blue}{2}} \cdot \sqrt{t}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
      11. sqrt-div20.8%

        \[\leadsto \frac{\sqrt{2} \cdot \ell}{{k}^{2} \cdot \sqrt{t}} \cdot \color{blue}{\frac{\sqrt{2 \cdot {\ell}^{2}}}{\sqrt{t \cdot {k}^{4}}}} \]
      12. sqrt-prod20.8%

        \[\leadsto \frac{\sqrt{2} \cdot \ell}{{k}^{2} \cdot \sqrt{t}} \cdot \frac{\color{blue}{\sqrt{2} \cdot \sqrt{{\ell}^{2}}}}{\sqrt{t \cdot {k}^{4}}} \]
      13. sqrt-pow133.1%

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

        \[\leadsto \frac{\sqrt{2} \cdot \ell}{{k}^{2} \cdot \sqrt{t}} \cdot \frac{\sqrt{2} \cdot {\ell}^{\color{blue}{1}}}{\sqrt{t \cdot {k}^{4}}} \]
      15. pow133.1%

        \[\leadsto \frac{\sqrt{2} \cdot \ell}{{k}^{2} \cdot \sqrt{t}} \cdot \frac{\sqrt{2} \cdot \color{blue}{\ell}}{\sqrt{t \cdot {k}^{4}}} \]
      16. *-commutative33.1%

        \[\leadsto \frac{\sqrt{2} \cdot \ell}{{k}^{2} \cdot \sqrt{t}} \cdot \frac{\sqrt{2} \cdot \ell}{\sqrt{\color{blue}{{k}^{4} \cdot t}}} \]
      17. sqrt-prod34.2%

        \[\leadsto \frac{\sqrt{2} \cdot \ell}{{k}^{2} \cdot \sqrt{t}} \cdot \frac{\sqrt{2} \cdot \ell}{\color{blue}{\sqrt{{k}^{4}} \cdot \sqrt{t}}} \]
      18. sqrt-pow136.6%

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

        \[\leadsto \frac{\sqrt{2} \cdot \ell}{{k}^{2} \cdot \sqrt{t}} \cdot \frac{\sqrt{2} \cdot \ell}{{k}^{\color{blue}{2}} \cdot \sqrt{t}} \]
    8. Applied egg-rr36.6%

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

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

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

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

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

    if 2.36e-91 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 77.9% accurate, 1.0× speedup?

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

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


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

    1. Initial program 39.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. Simplified52.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 k around 0 65.3%

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

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

        \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{{k}^{4} \cdot t} \]
      3. *-commutative65.7%

        \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    6. Applied egg-rr65.7%

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

        \[\leadsto \color{blue}{\sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \cdot \sqrt{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}}} \]
      2. pow248.1%

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

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

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

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

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

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

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

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

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

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

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

    if 1.25000000000000004e-54 < l

    1. Initial program 30.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. Simplified37.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 74.0% 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 \frac{\ell \cdot \ell}{\left(\sin k \cdot \tan k\right) \cdot \left({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 (/ (* l l) (* (* (sin k) (tan k)) (* (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 * ((l * l) / ((sin(k) * tan(k)) * (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 * l) / ((sin(k) * tan(k)) * ((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 * ((l * l) / ((Math.sin(k) * Math.tan(k)) * (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 * ((l * l) / ((math.sin(k) * math.tan(k)) * (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 * l) / Float64(Float64(sin(k) * tan(k)) * 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 * l) / ((sin(k) * tan(k)) * ((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[(l * l), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * 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 \frac{\ell \cdot \ell}{\left(\sin k \cdot \tan k\right) \cdot \left({k}^{2} \cdot t\_m\right)}\right)
\end{array}
Derivation
  1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 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 \frac{{\ell}^{2}}{{k}^{2} \cdot \left({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) (* (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) * (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) * ((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) * (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) * (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((l ^ 2.0) / Float64((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 * (2.0 * ((l ^ 2.0) / ((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[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * 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 \frac{{\ell}^{2}}{{k}^{2} \cdot \left({k}^{2} \cdot t\_m\right)}\right)
\end{array}
Derivation
  1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 63.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(\frac{2}{t\_m} \cdot \frac{{\ell}^{2}}{{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 t_m) (/ (pow l 2.0) (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 / t_m) * (pow(l, 2.0) / 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 / t_m) * ((l ** 2.0d0) / (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 / t_m) * (Math.pow(l, 2.0) / 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 / t_m) * (math.pow(l, 2.0) / 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(2.0 / t_m) * Float64((l ^ 2.0) / (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 / t_m) * ((l ^ 2.0) / (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[(2.0 / t$95$m), $MachinePrecision] * N[(N[Power[l, 2.0], $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(\frac{2}{t\_m} \cdot \frac{{\ell}^{2}}{{k}^{4}}\right)
\end{array}
Derivation
  1. Initial program 37.1%

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

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

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

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

      \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{{k}^{4} \cdot t} \]
    3. *-commutative63.4%

      \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
  6. Applied egg-rr63.4%

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

      \[\leadsto \color{blue}{\frac{2}{t} \cdot \frac{{\ell}^{2}}{{k}^{4}}} \]
  8. Applied egg-rr63.4%

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

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

Alternative 13: 62.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 37.1%

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

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

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

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

Alternative 14: 63.0% accurate, 3.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{\left(\ell \cdot \ell\right) \cdot 2}{t\_m \cdot {k}^{4}} \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(Float64(l * l) * 2.0) / Float64(t_m * (k ^ 4.0))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (((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[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(t$95$m * 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 \frac{\left(\ell \cdot \ell\right) \cdot 2}{t\_m \cdot {k}^{4}}
\end{array}
Derivation
  1. Initial program 37.1%

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

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

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

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

      \[\leadsto \frac{2 \cdot \color{blue}{{\ell}^{2}}}{{k}^{4} \cdot t} \]
    3. *-commutative63.4%

      \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
  6. Applied egg-rr63.4%

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

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

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

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

Alternative 15: 34.3% accurate, 60.1× 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}{0}\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 0.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 / 0.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 / 0.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 / 0.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 / 0.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 / 0.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 / 0.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 / 0.0), $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}{0}\right)
\end{array}
Derivation
  1. Initial program 37.1%

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

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

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

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

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

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

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

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

    \[\leadsto \left(\ell \cdot \ell\right) \cdot \frac{2}{0} \]
  8. Add Preprocessing

Reproduce

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