Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.6% → 88.5%
Time: 25.8s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 35.6% accurate, 1.0× speedup?

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

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

Alternative 1: 88.5% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 36.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e-207 < t < 5.8e186

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.8e186 < t

    1. Initial program 8.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.7% accurate, 0.8× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.15 \cdot 10^{-207} \lor \neg \left(t\_m \leq 1.45 \cdot 10^{+187}\right):\\
\;\;\;\;\frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \left(k \cdot \frac{\sqrt{t\_m}}{\ell}\right)\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.15e-207 or 1.45e187 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e-207 < t < 1.45e187

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6999999999999999e-223 < t < 1.42000000000000006e189

    1. Initial program 42.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.42000000000000006e189 < t

    1. Initial program 8.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.26000000000000009e-223 < t < 1.9200000000000001e161

    1. Initial program 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9200000000000001e161 < t

    1. Initial program 6.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. Simplified23.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6e-223 < t < 1.42000000000000006e189

    1. Initial program 42.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.42000000000000006e189 < t

    1. Initial program 8.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 l l)

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

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

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

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

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

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

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

Alternative 7: 78.0% 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 0:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \frac{k}{t\_m}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{{k}^{2}} \cdot \frac{\frac{\cos k}{t\_m}}{{\sin k}^{2}}\right)\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= (* l l) 0.0)
    (/ 2.0 (pow (* k (* (/ (pow t_m 1.5) l) (/ k t_m))) 2.0))
    (*
     (* l l)
     (* (/ 2.0 (pow k 2.0)) (/ (/ (cos k) t_m) (pow (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) <= 0.0) {
		tmp = 2.0 / pow((k * ((pow(t_m, 1.5) / l) * (k / t_m))), 2.0);
	} else {
		tmp = (l * l) * ((2.0 / pow(k, 2.0)) * ((cos(k) / t_m) / pow(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) <= 0.0d0) then
        tmp = 2.0d0 / ((k * (((t_m ** 1.5d0) / l) * (k / t_m))) ** 2.0d0)
    else
        tmp = (l * l) * ((2.0d0 / (k ** 2.0d0)) * ((cos(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) <= 0.0) {
		tmp = 2.0 / Math.pow((k * ((Math.pow(t_m, 1.5) / l) * (k / t_m))), 2.0);
	} else {
		tmp = (l * l) * ((2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) / t_m) / Math.pow(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) <= 0.0:
		tmp = 2.0 / math.pow((k * ((math.pow(t_m, 1.5) / l) * (k / t_m))), 2.0)
	else:
		tmp = (l * l) * ((2.0 / math.pow(k, 2.0)) * ((math.cos(k) / t_m) / math.pow(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) <= 0.0)
		tmp = Float64(2.0 / (Float64(k * Float64(Float64((t_m ^ 1.5) / l) * Float64(k / t_m))) ^ 2.0));
	else
		tmp = Float64(Float64(l * l) * Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) / 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) <= 0.0)
		tmp = 2.0 / ((k * (((t_m ^ 1.5) / l) * (k / t_m))) ^ 2.0);
	else
		tmp = (l * l) * ((2.0 / (k ^ 2.0)) * ((cos(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], 0.0], N[(2.0 / N[Power[N[(k * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 l l)

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 l l)

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 l l)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.0% accurate, 1.3× speedup?

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 l l)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 69.5% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.1 \cdot 10^{-223} \lor \neg \left(t\_m \leq 6.6 \cdot 10^{+160}\right):\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{{k}^{2}} \cdot \frac{1}{t\_m \cdot {k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \frac{k}{t\_m}\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 (or (<= t_m 3.1e-223) (not (<= t_m 6.6e+160)))
    (* (* l l) (* (/ 2.0 (pow k 2.0)) (/ 1.0 (* t_m (pow k 2.0)))))
    (/ 2.0 (pow (* k (* (/ (pow t_m 1.5) l) (/ k t_m))) 2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((t_m <= 3.1e-223) || !(t_m <= 6.6e+160)) {
		tmp = (l * l) * ((2.0 / pow(k, 2.0)) * (1.0 / (t_m * pow(k, 2.0))));
	} else {
		tmp = 2.0 / pow((k * ((pow(t_m, 1.5) / l) * (k / t_m))), 2.0);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((t_m <= 3.1d-223) .or. (.not. (t_m <= 6.6d+160))) then
        tmp = (l * l) * ((2.0d0 / (k ** 2.0d0)) * (1.0d0 / (t_m * (k ** 2.0d0))))
    else
        tmp = 2.0d0 / ((k * (((t_m ** 1.5d0) / l) * (k / t_m))) ** 2.0d0)
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((t_m <= 3.1e-223) || !(t_m <= 6.6e+160)) {
		tmp = (l * l) * ((2.0 / Math.pow(k, 2.0)) * (1.0 / (t_m * Math.pow(k, 2.0))));
	} else {
		tmp = 2.0 / Math.pow((k * ((Math.pow(t_m, 1.5) / l) * (k / t_m))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if (t_m <= 3.1e-223) or not (t_m <= 6.6e+160):
		tmp = (l * l) * ((2.0 / math.pow(k, 2.0)) * (1.0 / (t_m * math.pow(k, 2.0))))
	else:
		tmp = 2.0 / math.pow((k * ((math.pow(t_m, 1.5) / l) * (k / t_m))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if ((t_m <= 3.1e-223) || !(t_m <= 6.6e+160))
		tmp = Float64(Float64(l * l) * Float64(Float64(2.0 / (k ^ 2.0)) * Float64(1.0 / Float64(t_m * (k ^ 2.0)))));
	else
		tmp = Float64(2.0 / (Float64(k * Float64(Float64((t_m ^ 1.5) / l) * Float64(k / t_m))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if ((t_m <= 3.1e-223) || ~((t_m <= 6.6e+160)))
		tmp = (l * l) * ((2.0 / (k ^ 2.0)) * (1.0 / (t_m * (k ^ 2.0))));
	else
		tmp = 2.0 / ((k * (((t_m ^ 1.5) / l) * (k / t_m))) ^ 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[Or[LessEqual[t$95$m, 3.1e-223], N[Not[LessEqual[t$95$m, 6.6e+160]], $MachinePrecision]], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(k * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.1 \cdot 10^{-223} \lor \neg \left(t\_m \leq 6.6 \cdot 10^{+160}\right):\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{{k}^{2}} \cdot \frac{1}{t\_m \cdot {k}^{2}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.10000000000000018e-223 or 6.5999999999999994e160 < t

    1. Initial program 32.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. Simplified41.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 t around 0 76.3%

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

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

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

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

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

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

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

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

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

    if 3.10000000000000018e-223 < t < 6.5999999999999994e160

    1. Initial program 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.1 \cdot 10^{-223} \lor \neg \left(t \leq 6.6 \cdot 10^{+160}\right):\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{{k}^{2}} \cdot \frac{1}{t \cdot {k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \frac{k}{t}\right)\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 68.3% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3 \cdot 10^{-223}:\\ \;\;\;\;{k}^{-4} \cdot \left(\frac{2}{t\_m} \cdot {\ell}^{2}\right)\\ \mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+161}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \frac{k}{t\_m}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot {k}^{-4}}{t\_m}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3e-223)
    (* (pow k -4.0) (* (/ 2.0 t_m) (pow l 2.0)))
    (if (<= t_m 2.1e+161)
      (/ 2.0 (pow (* k (* (/ (pow t_m 1.5) l) (/ k t_m))) 2.0))
      (* (* l l) (/ (* 2.0 (pow k -4.0)) t_m))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3e-223) {
		tmp = pow(k, -4.0) * ((2.0 / t_m) * pow(l, 2.0));
	} else if (t_m <= 2.1e+161) {
		tmp = 2.0 / pow((k * ((pow(t_m, 1.5) / l) * (k / t_m))), 2.0);
	} else {
		tmp = (l * l) * ((2.0 * pow(k, -4.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 (t_m <= 3d-223) then
        tmp = (k ** (-4.0d0)) * ((2.0d0 / t_m) * (l ** 2.0d0))
    else if (t_m <= 2.1d+161) then
        tmp = 2.0d0 / ((k * (((t_m ** 1.5d0) / l) * (k / t_m))) ** 2.0d0)
    else
        tmp = (l * l) * ((2.0d0 * (k ** (-4.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 (t_m <= 3e-223) {
		tmp = Math.pow(k, -4.0) * ((2.0 / t_m) * Math.pow(l, 2.0));
	} else if (t_m <= 2.1e+161) {
		tmp = 2.0 / Math.pow((k * ((Math.pow(t_m, 1.5) / l) * (k / t_m))), 2.0);
	} else {
		tmp = (l * l) * ((2.0 * Math.pow(k, -4.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 t_m <= 3e-223:
		tmp = math.pow(k, -4.0) * ((2.0 / t_m) * math.pow(l, 2.0))
	elif t_m <= 2.1e+161:
		tmp = 2.0 / math.pow((k * ((math.pow(t_m, 1.5) / l) * (k / t_m))), 2.0)
	else:
		tmp = (l * l) * ((2.0 * math.pow(k, -4.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 (t_m <= 3e-223)
		tmp = Float64((k ^ -4.0) * Float64(Float64(2.0 / t_m) * (l ^ 2.0)));
	elseif (t_m <= 2.1e+161)
		tmp = Float64(2.0 / (Float64(k * Float64(Float64((t_m ^ 1.5) / l) * Float64(k / t_m))) ^ 2.0));
	else
		tmp = Float64(Float64(l * l) * Float64(Float64(2.0 * (k ^ -4.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 (t_m <= 3e-223)
		tmp = (k ^ -4.0) * ((2.0 / t_m) * (l ^ 2.0));
	elseif (t_m <= 2.1e+161)
		tmp = 2.0 / ((k * (((t_m ^ 1.5) / l) * (k / t_m))) ^ 2.0);
	else
		tmp = (l * l) * ((2.0 * (k ^ -4.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[t$95$m, 3e-223], N[(N[Power[k, -4.0], $MachinePrecision] * N[(N[(2.0 / t$95$m), $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+161], N[(2.0 / N[Power[N[(k * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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


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

    1. Initial program 37.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified44.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 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.99999999999999991e-223 < t < 2.1e161

    1. Initial program 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1e161 < t

    1. Initial program 6.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. Simplified23.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 62.6% accurate, 2.0× speedup?

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

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

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

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

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot t}} \cdot \left(\ell \cdot \ell\right) \]
  5. Taylor expanded in k around 0 64.9%

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

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

    \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  8. Final simplification66.0%

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

Alternative 14: 62.3% 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 36.0%

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

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

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

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

Alternative 15: 62.3% accurate, 3.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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