Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.8% → 83.7%
Time: 16.9s
Alternatives: 20
Speedup: 24.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 20 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: 54.8% accurate, 1.0× speedup?

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

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

Alternative 1: 83.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_m \leq 2.95 \cdot 10^{-5}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 4.2e-113

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2e-113 < t < 2.9499999999999999e-5

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    8. Taylor expanded in k around inf 63.3%

      \[\leadsto \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \color{blue}{\frac{\ell \cdot t}{k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    9. Taylor expanded in k around inf 92.0%

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

    if 2.9499999999999999e-5 < t < 5.60000000000000037e102

    1. Initial program 73.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. Simplified76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.60000000000000037e102 < t

    1. Initial program 60.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. Simplified49.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    8. Step-by-step derivation
      1. *-commutative66.3%

        \[\leadsto \left(\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. add-cube-cbrt66.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{{\left(\color{blue}{\left(t \cdot \sqrt[3]{\sin k}\right)} \cdot \sqrt[3]{\tan k}\right)}^{3}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    11. Applied egg-rr79.5%

      \[\leadsto \left(\frac{2}{\color{blue}{{\left(\left(t \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k}\right)}^{3}}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    12. Taylor expanded in k around 0 79.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.2 \cdot 10^{-113}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t \cdot \frac{{\sin k}^{2}}{\ell \cdot \cos k}\right)}{\ell}}\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{-5}:\\ \;\;\;\;\frac{t \cdot \ell}{k} \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t}^{3}\right)} \cdot \frac{t \cdot \ell}{k}\right)\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+102}:\\ \;\;\;\;\frac{\frac{2 \cdot \ell}{\sin k}}{\tan k \cdot {t}^{3}} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{2}{{\left(\left(t \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k}\right)}^{3}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \left(\ell \cdot \sqrt{0.5}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 84.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_2 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-73}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot \frac{{\sin k}^{2}}{\ell \cdot \cos k}\right)}{\ell}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\color{blue}{{k}^{2} \cdot \frac{t \cdot {\sin k}^{2}}{\ell \cdot \cos k}}}{\ell}} \]
      2. associate-/l*76.1%

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

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

    if 4.1999999999999997e-73 < t

    1. Initial program 68.4%

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{\left(\sin k \cdot {t}^{3}\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified77.9%

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

        \[\leadsto \left(\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. add-cube-cbrt77.8%

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

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

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

        \[\leadsto \left(\frac{2}{{\left(\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      6. add-cbrt-cube82.4%

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

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

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

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

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

        \[\leadsto \left(\frac{2}{{\left(\sqrt[3]{\color{blue}{\left(\left(t \cdot \sqrt[3]{\sin k}\right) \cdot \left(t \cdot \sqrt[3]{\sin k}\right)\right) \cdot \left(t \cdot \sqrt[3]{\sin k}\right)}} \cdot \sqrt[3]{\tan k}\right)}^{3}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      5. add-cbrt-cube84.4%

        \[\leadsto \left(\frac{2}{{\left(\color{blue}{\left(t \cdot \sqrt[3]{\sin k}\right)} \cdot \sqrt[3]{\tan k}\right)}^{3}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    11. Applied egg-rr84.4%

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

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

Alternative 3: 81.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t\_m \leq 2.2 \cdot 10^{-6}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\

\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{\sin k}}{\tan k \cdot {t\_m}^{3}} \cdot \frac{\ell}{2 + t\_3}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 4.2e-113

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2e-113 < t < 2.2000000000000001e-6

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    8. Taylor expanded in k around inf 63.3%

      \[\leadsto \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \color{blue}{\frac{\ell \cdot t}{k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    9. Taylor expanded in k around inf 92.0%

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

    if 2.2000000000000001e-6 < t < 5.60000000000000037e102

    1. Initial program 73.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. Simplified76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.60000000000000037e102 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t\_m \leq 2.95 \cdot 10^{-5}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\

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


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

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2e-113 < t < 2.9499999999999999e-5

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    8. Taylor expanded in k around inf 63.3%

      \[\leadsto \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \color{blue}{\frac{\ell \cdot t}{k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    9. Taylor expanded in k around inf 92.0%

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

    if 2.9499999999999999e-5 < t

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. add-cube-cbrt74.2%

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

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

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

        \[\leadsto \left(\frac{2}{{\left(\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      6. add-cbrt-cube79.8%

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

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

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

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

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

\mathbf{elif}\;t\_m \leq 8.8 \cdot 10^{-7}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 4.2e-113

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2e-113 < t < 8.8000000000000004e-7

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    8. Taylor expanded in k around inf 63.3%

      \[\leadsto \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \color{blue}{\frac{\ell \cdot t}{k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    9. Taylor expanded in k around inf 92.0%

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

    if 8.8000000000000004e-7 < t < 5.60000000000000037e102

    1. Initial program 73.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. Simplified76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.60000000000000037e102 < t

    1. Initial program 60.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. Simplified49.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. add-cube-cbrt66.3%

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

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

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

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

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

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

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

Alternative 6: 77.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2e-113 < t < 3.2999999999999999e69

    1. Initial program 83.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. Simplified83.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. *-commutative90.6%

        \[\leadsto \left(\frac{2}{\color{blue}{\left(\sin k \cdot {t}^{3}\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified90.6%

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    8. Taylor expanded in k around inf 62.6%

      \[\leadsto \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \color{blue}{\frac{\ell \cdot t}{k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    9. Taylor expanded in k around inf 86.3%

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

    if 3.2999999999999999e69 < t

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. add-cube-cbrt68.9%

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

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

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

        \[\leadsto \left(\frac{2}{{\left(\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      6. add-cbrt-cube76.4%

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

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

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

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

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

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

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


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

    1. Initial program 48.9%

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

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

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

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

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

    if 4.2e-113 < t < 1.3499999999999999e69

    1. Initial program 83.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. Simplified83.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. *-commutative90.6%

        \[\leadsto \left(\frac{2}{\color{blue}{\left(\sin k \cdot {t}^{3}\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified90.6%

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    8. Taylor expanded in k around inf 62.6%

      \[\leadsto \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \color{blue}{\frac{\ell \cdot t}{k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    9. Taylor expanded in k around inf 86.3%

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

    if 1.3499999999999999e69 < t

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. add-cube-cbrt68.9%

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

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

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

        \[\leadsto \left(\frac{2}{{\left(\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      6. add-cbrt-cube76.4%

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

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

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

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

\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot \ell}{k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\

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

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


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

    1. Initial program 48.9%

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

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

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

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

        \[\leadsto \color{blue}{2 \cdot \frac{1}{\frac{{k}^{4} \cdot t}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*62.4%

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

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

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

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

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

    if 4.2e-113 < t < 1.39999999999999991e69

    1. Initial program 83.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. Simplified83.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. *-commutative90.6%

        \[\leadsto \left(\frac{2}{\color{blue}{\left(\sin k \cdot {t}^{3}\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified90.6%

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    8. Taylor expanded in k around inf 62.6%

      \[\leadsto \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \color{blue}{\frac{\ell \cdot t}{k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    9. Taylor expanded in k around inf 86.3%

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

    if 1.39999999999999991e69 < t

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. add-cube-cbrt68.9%

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

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

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

        \[\leadsto \left(\frac{2}{{\left(\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      6. add-cbrt-cube76.4%

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

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

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

Alternative 9: 67.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot \ell}{k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\

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

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


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

    1. Initial program 48.9%

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

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

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

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

        \[\leadsto \color{blue}{2 \cdot \frac{1}{\frac{{k}^{4} \cdot t}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*62.4%

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

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

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

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

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

    if 4.2e-113 < t < 2.80000000000000008e34

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{\left(\sin k \cdot {t}^{3}\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified93.9%

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    8. Taylor expanded in k around inf 61.4%

      \[\leadsto \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \color{blue}{\frac{\ell \cdot t}{k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    9. Taylor expanded in k around inf 88.4%

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

    if 2.80000000000000008e34 < t

    1. Initial program 60.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. Simplified52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 66.8% 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}\;t\_m \leq 4.2 \cdot 10^{-113}:\\ \;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t\_m \leq 3.7 \cdot 10^{+34}:\\ \;\;\;\;\left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot \frac{t\_m \cdot \ell}{k}\right) \cdot \left(\ell \cdot \frac{t\_m}{k}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2 \cdot \ell}{\sin k}}{\tan k \cdot {t\_m}^{3}} \cdot \left(\ell \cdot 0.5\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 4.2e-113)
    (/ 2.0 (* (pow k 4.0) (/ t_m (* (cos k) (pow l 2.0)))))
    (if (<= t_m 3.7e+34)
      (*
       (* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) (/ (* t_m l) k))
       (* l (/ t_m k)))
      (* (/ (/ (* 2.0 l) (sin k)) (* (tan k) (pow t_m 3.0))) (* l 0.5))))))
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 <= 4.2e-113) {
		tmp = 2.0 / (pow(k, 4.0) * (t_m / (cos(k) * pow(l, 2.0))));
	} else if (t_m <= 3.7e+34) {
		tmp = ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * ((t_m * l) / k)) * (l * (t_m / k));
	} else {
		tmp = (((2.0 * l) / sin(k)) / (tan(k) * pow(t_m, 3.0))) * (l * 0.5);
	}
	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 <= 4.2d-113) then
        tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (cos(k) * (l ** 2.0d0))))
    else if (t_m <= 3.7d+34) then
        tmp = ((2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0)))) * ((t_m * l) / k)) * (l * (t_m / k))
    else
        tmp = (((2.0d0 * l) / sin(k)) / (tan(k) * (t_m ** 3.0d0))) * (l * 0.5d0)
    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 <= 4.2e-113) {
		tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / (Math.cos(k) * Math.pow(l, 2.0))));
	} else if (t_m <= 3.7e+34) {
		tmp = ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * ((t_m * l) / k)) * (l * (t_m / k));
	} else {
		tmp = (((2.0 * l) / Math.sin(k)) / (Math.tan(k) * Math.pow(t_m, 3.0))) * (l * 0.5);
	}
	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 <= 4.2e-113:
		tmp = 2.0 / (math.pow(k, 4.0) * (t_m / (math.cos(k) * math.pow(l, 2.0))))
	elif t_m <= 3.7e+34:
		tmp = ((2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0)))) * ((t_m * l) / k)) * (l * (t_m / k))
	else:
		tmp = (((2.0 * l) / math.sin(k)) / (math.tan(k) * math.pow(t_m, 3.0))) * (l * 0.5)
	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 <= 4.2e-113)
		tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / Float64(cos(k) * (l ^ 2.0)))));
	elseif (t_m <= 3.7e+34)
		tmp = Float64(Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * Float64(Float64(t_m * l) / k)) * Float64(l * Float64(t_m / k)));
	else
		tmp = Float64(Float64(Float64(Float64(2.0 * l) / sin(k)) / Float64(tan(k) * (t_m ^ 3.0))) * Float64(l * 0.5));
	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 <= 4.2e-113)
		tmp = 2.0 / ((k ^ 4.0) * (t_m / (cos(k) * (l ^ 2.0))));
	elseif (t_m <= 3.7e+34)
		tmp = ((2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0)))) * ((t_m * l) / k)) * (l * (t_m / k));
	else
		tmp = (((2.0 * l) / sin(k)) / (tan(k) * (t_m ^ 3.0))) * (l * 0.5);
	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, 4.2e-113], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.7e+34], N[(N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] * N[(l * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $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 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\

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

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


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

    1. Initial program 48.9%

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

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

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

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

        \[\leadsto \color{blue}{2 \cdot \frac{1}{\frac{{k}^{4} \cdot t}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*62.4%

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

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

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

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

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

    if 4.2e-113 < t < 3.70000000000000009e34

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{\left(\sin k \cdot {t}^{3}\right)} \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified93.9%

      \[\leadsto \color{blue}{\left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    8. Taylor expanded in k around inf 61.4%

      \[\leadsto \left(\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k} \cdot \color{blue}{\frac{\ell \cdot t}{k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    9. Taylor expanded in k around inf 88.4%

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

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

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

    if 3.70000000000000009e34 < t

    1. Initial program 60.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. Simplified52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 58.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.35000000000000005e54 < k

    1. Initial program 47.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. Simplified47.3%

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

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

      \[\leadsto \frac{2}{\frac{\color{blue}{{k}^{4} \cdot t}}{{\ell}^{2} \cdot \cos k}} \]
    6. Step-by-step derivation
      1. div-inv64.8%

        \[\leadsto \color{blue}{2 \cdot \frac{1}{\frac{{k}^{4} \cdot t}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*66.3%

        \[\leadsto 2 \cdot \frac{1}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2} \cdot \cos k}}} \]
    7. Applied egg-rr66.3%

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

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

        \[\leadsto \frac{\color{blue}{2}}{{k}^{4} \cdot \frac{t}{{\ell}^{2} \cdot \cos k}} \]
    9. Simplified66.3%

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

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

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

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


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

    1. Initial program 58.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.54999999999999987e53 < k

    1. Initial program 47.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. Simplified47.3%

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

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

      \[\leadsto \frac{2}{\frac{\color{blue}{{k}^{4} \cdot t}}{{\ell}^{2} \cdot \cos k}} \]
    6. Step-by-step derivation
      1. div-inv64.8%

        \[\leadsto \color{blue}{2 \cdot \frac{1}{\frac{{k}^{4} \cdot t}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*66.3%

        \[\leadsto 2 \cdot \frac{1}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2} \cdot \cos k}}} \]
    7. Applied egg-rr66.3%

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

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

        \[\leadsto \frac{\color{blue}{2}}{{k}^{4} \cdot \frac{t}{{\ell}^{2} \cdot \cos k}} \]
    9. Simplified66.3%

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

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

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

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

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


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

    1. Initial program 60.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. Simplified55.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2500000000000001e-34 < k

    1. Initial program 45.7%

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

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

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

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

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

Alternative 14: 60.9% 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}\;k \leq 1.15 \cdot 10^{-34}:\\ \;\;\;\;\left(\ell \cdot 0.5\right) \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.15e-34)
    (* (* l 0.5) (* l (/ 2.0 (* (tan k) (* k (pow t_m 3.0))))))
    (/ 2.0 (* (pow k 4.0) (/ t_m (* (cos k) (pow l 2.0))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.15e-34) {
		tmp = (l * 0.5) * (l * (2.0 / (tan(k) * (k * pow(t_m, 3.0)))));
	} else {
		tmp = 2.0 / (pow(k, 4.0) * (t_m / (cos(k) * pow(l, 2.0))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 1.15d-34) then
        tmp = (l * 0.5d0) * (l * (2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))))
    else
        tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (cos(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 tmp;
	if (k <= 1.15e-34) {
		tmp = (l * 0.5) * (l * (2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))));
	} else {
		tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / (Math.cos(k) * Math.pow(l, 2.0))));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 1.15e-34:
		tmp = (l * 0.5) * (l * (2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0)))))
	else:
		tmp = 2.0 / (math.pow(k, 4.0) * (t_m / (math.cos(k) * math.pow(l, 2.0))))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 1.15e-34)
		tmp = Float64(Float64(l * 0.5) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0))))));
	else
		tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / Float64(cos(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)
	tmp = 0.0;
	if (k <= 1.15e-34)
		tmp = (l * 0.5) * (l * (2.0 / (tan(k) * (k * (t_m ^ 3.0)))));
	else
		tmp = 2.0 / ((k ^ 4.0) * (t_m / (cos(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_] := N[(t$95$s * If[LessEqual[k, 1.15e-34], N[(N[(l * 0.5), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 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}\;k \leq 1.15 \cdot 10^{-34}:\\
\;\;\;\;\left(\ell \cdot 0.5\right) \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\

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


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

    1. Initial program 60.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. Simplified55.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15000000000000006e-34 < k

    1. Initial program 45.7%

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

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

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

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

        \[\leadsto \color{blue}{2 \cdot \frac{1}{\frac{{k}^{4} \cdot t}{{\ell}^{2} \cdot \cos k}}} \]
      2. associate-/l*64.5%

        \[\leadsto 2 \cdot \frac{1}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2} \cdot \cos k}}} \]
    7. Applied egg-rr64.5%

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

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

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

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

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

Alternative 15: 60.7% accurate, 1.9× speedup?

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

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


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

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9499999999999999e40 < k

    1. Initial program 47.4%

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.6%

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

Alternative 16: 60.8% accurate, 1.9× speedup?

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

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


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

    1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5e81 < k

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.5%

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

Alternative 17: 57.0% accurate, 1.9× speedup?

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

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


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

    1. Initial program 60.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. Simplified55.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2500000000000001e-34 < k

    1. Initial program 45.7%

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

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

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

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

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

Alternative 18: 58.9% accurate, 2.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}\;k \leq 1.25 \cdot 10^{-34}:\\ \;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.25e-34)
    (/ 2.0 (* (* 2.0 (* k k)) (/ (* t_m (/ (pow t_m 2.0) l)) l)))
    (* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.25e-34) {
		tmp = 2.0 / ((2.0 * (k * k)) * ((t_m * (pow(t_m, 2.0) / l)) / l));
	} else {
		tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.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 (k <= 1.25d-34) then
        tmp = 2.0d0 / ((2.0d0 * (k * k)) * ((t_m * ((t_m ** 2.0d0) / l)) / l))
    else
        tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.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 (k <= 1.25e-34) {
		tmp = 2.0 / ((2.0 * (k * k)) * ((t_m * (Math.pow(t_m, 2.0) / l)) / l));
	} else {
		tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.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 k <= 1.25e-34:
		tmp = 2.0 / ((2.0 * (k * k)) * ((t_m * (math.pow(t_m, 2.0) / l)) / l))
	else:
		tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 1.25e-34)
		tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64(t_m * Float64((t_m ^ 2.0) / l)) / l)));
	else
		tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.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 (k <= 1.25e-34)
		tmp = 2.0 / ((2.0 * (k * k)) * ((t_m * ((t_m ^ 2.0) / l)) / l));
	else
		tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.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[k, 1.25e-34], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / 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 \begin{array}{l}
\mathbf{if}\;k \leq 1.25 \cdot 10^{-34}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\

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


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

    1. Initial program 60.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. Simplified58.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.2500000000000001e-34 < k

    1. Initial program 45.7%

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

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

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

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

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

Alternative 19: 58.1% accurate, 3.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 58.4% accurate, 24.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\left(\frac{\color{blue}{t \cdot t}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  11. Final simplification58.1%

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

Reproduce

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