Toniolo and Linder, Equation (7)

Percentage Accurate: 34.4% → 84.9%
Time: 15.9s
Alternatives: 9
Speedup: 225.0×

Specification

?
\[\begin{array}{l} \\ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (/
  (* (sqrt 2.0) t)
  (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
	return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
	return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t):
	return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t)
	return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l))))
end
function tmp = code(x, l, t)
	tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\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 9 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: 34.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (/
  (* (sqrt 2.0) t)
  (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
	return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
	return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t):
	return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t)
	return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l))))
end
function tmp = code(x, l, t)
	tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}

Alternative 1: 84.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \ell \cdot \frac{\ell}{x}\\ t_2 := \frac{t}{\sqrt{0.5 \cdot \left(t_1 + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, t_1\right)\right)\right)}}\\ t_3 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -1.46 \cdot 10^{+145}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-197}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-302}:\\ \;\;\;\;-t_3\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+23}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* l (/ l x)))
        (t_2
         (/
          t
          (sqrt
           (* 0.5 (+ t_1 (fma 2.0 (/ t (/ x t)) (fma 2.0 (* t t) t_1)))))))
        (t_3 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -1.46e+145)
     (/ t (- t))
     (if (<= t -2.7e-197)
       t_2
       (if (<= t -1e-302) (- t_3) (if (<= t 1.15e+23) t_2 t_3))))))
double code(double x, double l, double t) {
	double t_1 = l * (l / x);
	double t_2 = t / sqrt((0.5 * (t_1 + fma(2.0, (t / (x / t)), fma(2.0, (t * t), t_1)))));
	double t_3 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -1.46e+145) {
		tmp = t / -t;
	} else if (t <= -2.7e-197) {
		tmp = t_2;
	} else if (t <= -1e-302) {
		tmp = -t_3;
	} else if (t <= 1.15e+23) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, l, t)
	t_1 = Float64(l * Float64(l / x))
	t_2 = Float64(t / sqrt(Float64(0.5 * Float64(t_1 + fma(2.0, Float64(t / Float64(x / t)), fma(2.0, Float64(t * t), t_1))))))
	t_3 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -1.46e+145)
		tmp = Float64(t / Float64(-t));
	elseif (t <= -2.7e-197)
		tmp = t_2;
	elseif (t <= -1e-302)
		tmp = Float64(-t_3);
	elseif (t <= 1.15e+23)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
code[x_, l_, t_] := Block[{t$95$1 = N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[Sqrt[N[(0.5 * N[(t$95$1 + N[(2.0 * N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.46e+145], N[(t / (-t)), $MachinePrecision], If[LessEqual[t, -2.7e-197], t$95$2, If[LessEqual[t, -1e-302], (-t$95$3), If[LessEqual[t, 1.15e+23], t$95$2, t$95$3]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\ell}{x}\\
t_2 := \frac{t}{\sqrt{0.5 \cdot \left(t_1 + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, t_1\right)\right)\right)}}\\
t_3 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1.46 \cdot 10^{+145}:\\
\;\;\;\;\frac{t}{-t}\\

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-197}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1 \cdot 10^{-302}:\\
\;\;\;\;-t_3\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+23}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.45999999999999988e145

    1. Initial program 7.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/7.1%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified7.1%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative7.1%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num7.2%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv7.1%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv7.2%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval7.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg7.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/2.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg2.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval2.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr2.4%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative2.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative2.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative2.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative2.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified2.4%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 7.9%

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

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

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{2 \cdot \left(t \cdot t\right)}}{2}}} \]
    11. Taylor expanded in t around -inf 97.7%

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot t}} \]
    12. Step-by-step derivation
      1. mul-1-neg97.7%

        \[\leadsto \frac{t}{\color{blue}{-t}} \]
    13. Simplified97.7%

      \[\leadsto \frac{t}{\color{blue}{-t}} \]

    if -1.45999999999999988e145 < t < -2.70000000000000017e-197 or -9.9999999999999996e-303 < t < 1.15e23

    1. Initial program 42.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/42.5%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified42.5%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative42.5%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num42.5%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv42.5%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv42.7%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval42.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg42.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/34.1%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg34.1%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval34.1%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr34.1%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative34.1%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative34.1%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative34.1%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative34.1%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified34.1%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 78.4%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{2}}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv78.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{2}}} \]
      2. fma-def78.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, 2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)} + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      3. unpow278.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\color{blue}{t \cdot t}}{x}, 2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      4. fma-def78.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \color{blue}{\mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)}\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      5. unpow278.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, \color{blue}{t \cdot t}, \frac{{\ell}^{2}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      6. unpow278.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      7. metadata-eval78.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      8. unpow278.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{2 \cdot \color{blue}{\left(t \cdot t\right)} + {\ell}^{2}}{x}}{2}}} \]
      9. unpow278.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{2 \cdot \left(t \cdot t\right) + \color{blue}{\ell \cdot \ell}}{x}}{2}}} \]
      10. fma-udef78.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x}}{2}}} \]
      11. *-lft-identity78.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}{2}}} \]
      12. fma-udef78.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{2 \cdot \left(t \cdot t\right) + \ell \cdot \ell}}{x}}{2}}} \]
      13. unpow278.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot \color{blue}{{t}^{2}} + \ell \cdot \ell}{x}}{2}}} \]
      14. unpow278.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot {t}^{2} + \color{blue}{{\ell}^{2}}}{x}}{2}}} \]
    10. Simplified78.4%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}{2}}} \]
    11. Taylor expanded in l around inf 78.0%

      \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{{\ell}^{2}}{x}}}{2}}} \]
    12. Step-by-step derivation
      1. unpow278.0%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\ell \cdot \ell}}{x}}{2}}} \]
    13. Simplified78.0%

      \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\ell \cdot \ell}{x}}}{2}}} \]
    14. Step-by-step derivation
      1. expm1-log1p-u75.6%

        \[\leadsto \frac{t}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\ell \cdot \ell}{x}}{2}}\right)\right)}} \]
      2. expm1-udef41.9%

        \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\ell \cdot \ell}{x}}{2}}\right)} - 1}} \]
    15. Applied egg-rr50.6%

      \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\sqrt{\left(\frac{\ell}{\frac{x}{\ell}} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell}{\frac{x}{\ell}}\right)\right)\right) \cdot 0.5}\right)} - 1}} \]
    16. Step-by-step derivation
      1. expm1-def84.3%

        \[\leadsto \frac{t}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\left(\frac{\ell}{\frac{x}{\ell}} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell}{\frac{x}{\ell}}\right)\right)\right) \cdot 0.5}\right)\right)}} \]
      2. expm1-log1p87.3%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\left(\frac{\ell}{\frac{x}{\ell}} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell}{\frac{x}{\ell}}\right)\right)\right) \cdot 0.5}}} \]
      3. *-commutative87.3%

        \[\leadsto \frac{t}{\sqrt{\color{blue}{0.5 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell}{\frac{x}{\ell}}\right)\right)\right)}}} \]
      4. associate-/r/87.4%

        \[\leadsto \frac{t}{\sqrt{0.5 \cdot \left(\color{blue}{\frac{\ell}{x} \cdot \ell} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell}{\frac{x}{\ell}}\right)\right)\right)}} \]
      5. associate-/l*87.4%

        \[\leadsto \frac{t}{\sqrt{0.5 \cdot \left(\frac{\ell}{x} \cdot \ell + \mathsf{fma}\left(2, \color{blue}{\frac{t}{\frac{x}{t}}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell}{\frac{x}{\ell}}\right)\right)\right)}} \]
      6. associate-/r/87.3%

        \[\leadsto \frac{t}{\sqrt{0.5 \cdot \left(\frac{\ell}{x} \cdot \ell + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \color{blue}{\frac{\ell}{x} \cdot \ell}\right)\right)\right)}} \]
    17. Simplified87.3%

      \[\leadsto \frac{t}{\color{blue}{\sqrt{0.5 \cdot \left(\frac{\ell}{x} \cdot \ell + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell}{x} \cdot \ell\right)\right)\right)}}} \]

    if -2.70000000000000017e-197 < t < -9.9999999999999996e-303

    1. Initial program 6.8%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/6.8%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified6.8%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 2.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative2.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/2.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg2.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval2.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow22.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative2.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified2.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in t around -inf 64.3%

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    8. Step-by-step derivation
      1. mul-1-neg64.3%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg64.3%

        \[\leadsto -\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}} \]
      3. metadata-eval64.3%

        \[\leadsto -\sqrt{\frac{x + \color{blue}{-1}}{1 + x}} \]
    9. Simplified64.3%

      \[\leadsto \color{blue}{-\sqrt{\frac{x + -1}{1 + x}}} \]

    if 1.15e23 < t

    1. Initial program 33.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/33.4%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified33.4%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 17.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative17.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/40.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg40.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval40.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow240.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative40.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified40.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 96.9%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification89.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.46 \cdot 10^{+145}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-197}:\\ \;\;\;\;\frac{t}{\sqrt{0.5 \cdot \left(\ell \cdot \frac{\ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \frac{\ell}{x}\right)\right)\right)}}\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-302}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+23}:\\ \;\;\;\;\frac{t}{\sqrt{0.5 \cdot \left(\ell \cdot \frac{\ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \frac{\ell}{x}\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 2: 74.5% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{-t}\\ t_2 := \frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{if}\;t \leq -5.2 \cdot 10^{-104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-197}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-140}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ t (- t))) (t_2 (/ t (/ l (sqrt x)))))
   (if (<= t -5.2e-104)
     t_1
     (if (<= t -4.5e-197)
       t_2
       (if (<= t -1.8e-302)
         t_1
         (if (<= t 1.35e-140) t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))
double code(double x, double l, double t) {
	double t_1 = t / -t;
	double t_2 = t / (l / sqrt(x));
	double tmp;
	if (t <= -5.2e-104) {
		tmp = t_1;
	} else if (t <= -4.5e-197) {
		tmp = t_2;
	} else if (t <= -1.8e-302) {
		tmp = t_1;
	} else if (t <= 1.35e-140) {
		tmp = t_2;
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t / -t
    t_2 = t / (l / sqrt(x))
    if (t <= (-5.2d-104)) then
        tmp = t_1
    else if (t <= (-4.5d-197)) then
        tmp = t_2
    else if (t <= (-1.8d-302)) then
        tmp = t_1
    else if (t <= 1.35d-140) then
        tmp = t_2
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = t / -t;
	double t_2 = t / (l / Math.sqrt(x));
	double tmp;
	if (t <= -5.2e-104) {
		tmp = t_1;
	} else if (t <= -4.5e-197) {
		tmp = t_2;
	} else if (t <= -1.8e-302) {
		tmp = t_1;
	} else if (t <= 1.35e-140) {
		tmp = t_2;
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
def code(x, l, t):
	t_1 = t / -t
	t_2 = t / (l / math.sqrt(x))
	tmp = 0
	if t <= -5.2e-104:
		tmp = t_1
	elif t <= -4.5e-197:
		tmp = t_2
	elif t <= -1.8e-302:
		tmp = t_1
	elif t <= 1.35e-140:
		tmp = t_2
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
function code(x, l, t)
	t_1 = Float64(t / Float64(-t))
	t_2 = Float64(t / Float64(l / sqrt(x)))
	tmp = 0.0
	if (t <= -5.2e-104)
		tmp = t_1;
	elseif (t <= -4.5e-197)
		tmp = t_2;
	elseif (t <= -1.8e-302)
		tmp = t_1;
	elseif (t <= 1.35e-140)
		tmp = t_2;
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = t / -t;
	t_2 = t / (l / sqrt(x));
	tmp = 0.0;
	if (t <= -5.2e-104)
		tmp = t_1;
	elseif (t <= -4.5e-197)
		tmp = t_2;
	elseif (t <= -1.8e-302)
		tmp = t_1;
	elseif (t <= 1.35e-140)
		tmp = t_2;
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(t / (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e-104], t$95$1, If[LessEqual[t, -4.5e-197], t$95$2, If[LessEqual[t, -1.8e-302], t$95$1, If[LessEqual[t, 1.35e-140], t$95$2, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{-t}\\
t_2 := \frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{-104}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-197}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.35 \cdot 10^{-140}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.20000000000000005e-104 or -4.5000000000000001e-197 < t < -1.8e-302

    1. Initial program 32.7%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.7%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.7%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative32.7%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num32.7%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv32.7%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv32.9%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval32.9%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg32.9%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr20.3%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified20.3%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 37.1%

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

        \[\leadsto \frac{t}{\sqrt{\frac{2 \cdot \color{blue}{\left(t \cdot t\right)}}{2}}} \]
    10. Simplified37.1%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{2 \cdot \left(t \cdot t\right)}}{2}}} \]
    11. Taylor expanded in t around -inf 82.0%

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot t}} \]
    12. Step-by-step derivation
      1. mul-1-neg82.0%

        \[\leadsto \frac{t}{\color{blue}{-t}} \]
    13. Simplified82.0%

      \[\leadsto \frac{t}{\color{blue}{-t}} \]

    if -5.20000000000000005e-104 < t < -4.5000000000000001e-197 or -1.8e-302 < t < 1.35e-140

    1. Initial program 10.6%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/10.6%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified10.6%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative10.6%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num10.6%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv10.6%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv10.6%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval10.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg10.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr13.2%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified13.2%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 67.5%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{2}}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{2}}} \]
      2. fma-def67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, 2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)} + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      3. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\color{blue}{t \cdot t}}{x}, 2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      4. fma-def67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \color{blue}{\mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)}\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      5. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, \color{blue}{t \cdot t}, \frac{{\ell}^{2}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      6. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      7. metadata-eval67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      8. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{2 \cdot \color{blue}{\left(t \cdot t\right)} + {\ell}^{2}}{x}}{2}}} \]
      9. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{2 \cdot \left(t \cdot t\right) + \color{blue}{\ell \cdot \ell}}{x}}{2}}} \]
      10. fma-udef67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x}}{2}}} \]
      11. *-lft-identity67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}{2}}} \]
      12. fma-udef67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{2 \cdot \left(t \cdot t\right) + \ell \cdot \ell}}{x}}{2}}} \]
      13. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot \color{blue}{{t}^{2}} + \ell \cdot \ell}{x}}{2}}} \]
      14. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot {t}^{2} + \color{blue}{{\ell}^{2}}}{x}}{2}}} \]
    10. Simplified67.5%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}{2}}} \]
    11. Taylor expanded in t around 0 47.9%

      \[\leadsto \frac{t}{\color{blue}{\left(\ell \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)\right) \cdot \sqrt{\frac{1}{x}}}} \]
    12. Step-by-step derivation
      1. associate-*l*47.9%

        \[\leadsto \frac{t}{\color{blue}{\ell \cdot \left(\left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1}{x}}\right)}} \]
      2. *-commutative47.9%

        \[\leadsto \frac{t}{\ell \cdot \left(\color{blue}{\left(\sqrt{2} \cdot \sqrt{0.5}\right)} \cdot \sqrt{\frac{1}{x}}\right)} \]
      3. associate-*l*48.0%

        \[\leadsto \frac{t}{\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)}} \]
    13. Simplified48.0%

      \[\leadsto \frac{t}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)}} \]
    14. Step-by-step derivation
      1. expm1-log1p-u39.1%

        \[\leadsto \frac{t}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot \left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)\right)\right)}} \]
      2. expm1-udef24.9%

        \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\ell \cdot \left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)\right)} - 1}} \]
      3. associate-*r*24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{0.5}\right) \cdot \sqrt{\frac{1}{x}}\right)}\right)} - 1} \]
      4. sqrt-unprod24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \left(\color{blue}{\sqrt{2 \cdot 0.5}} \cdot \sqrt{\frac{1}{x}}\right)\right)} - 1} \]
      5. metadata-eval24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \left(\sqrt{\color{blue}{1}} \cdot \sqrt{\frac{1}{x}}\right)\right)} - 1} \]
      6. metadata-eval24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \left(\color{blue}{1} \cdot \sqrt{\frac{1}{x}}\right)\right)} - 1} \]
      7. *-un-lft-identity24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \color{blue}{\sqrt{\frac{1}{x}}}\right)} - 1} \]
      8. add-sqr-sqrt24.3%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{\frac{1}{x}}\right)} - 1} \]
      9. sqrt-prod35.6%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\ell \cdot \ell}} \cdot \sqrt{\frac{1}{x}}\right)} - 1} \]
      10. sqrt-prod35.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\left(\ell \cdot \ell\right) \cdot \frac{1}{x}}}\right)} - 1} \]
      11. div-inv35.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\frac{\ell \cdot \ell}{x}}}\right)} - 1} \]
      12. sqrt-div35.6%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\frac{\sqrt{\ell \cdot \ell}}{\sqrt{x}}}\right)} - 1} \]
      13. sqrt-prod24.3%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}{\sqrt{x}}\right)} - 1} \]
      14. add-sqr-sqrt24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\frac{\color{blue}{\ell}}{\sqrt{x}}\right)} - 1} \]
    15. Applied egg-rr24.9%

      \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\frac{\ell}{\sqrt{x}}\right)} - 1}} \]
    16. Step-by-step derivation
      1. expm1-def39.2%

        \[\leadsto \frac{t}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\ell}{\sqrt{x}}\right)\right)}} \]
      2. expm1-log1p48.2%

        \[\leadsto \frac{t}{\color{blue}{\frac{\ell}{\sqrt{x}}}} \]
    17. Simplified48.2%

      \[\leadsto \frac{t}{\color{blue}{\frac{\ell}{\sqrt{x}}}} \]

    if 1.35e-140 < t

    1. Initial program 38.4%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/38.4%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified38.4%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 36.3%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative36.3%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow249.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified49.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 83.1%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{-104}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-197}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-140}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 3: 75.1% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{\ell}{\sqrt{x}}}\\ t_2 := \sqrt{\frac{x + -1}{x + 1}}\\ t_3 := -t_2\\ \mathbf{if}\;t \leq -5.2 \cdot 10^{-104}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-197}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-142}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ t (/ l (sqrt x))))
        (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0))))
        (t_3 (- t_2)))
   (if (<= t -5.2e-104)
     t_3
     (if (<= t -7e-197)
       t_1
       (if (<= t -1.8e-302) t_3 (if (<= t 1.8e-142) t_1 t_2))))))
double code(double x, double l, double t) {
	double t_1 = t / (l / sqrt(x));
	double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	double t_3 = -t_2;
	double tmp;
	if (t <= -5.2e-104) {
		tmp = t_3;
	} else if (t <= -7e-197) {
		tmp = t_1;
	} else if (t <= -1.8e-302) {
		tmp = t_3;
	} else if (t <= 1.8e-142) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t / (l / sqrt(x))
    t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    t_3 = -t_2
    if (t <= (-5.2d-104)) then
        tmp = t_3
    else if (t <= (-7d-197)) then
        tmp = t_1
    else if (t <= (-1.8d-302)) then
        tmp = t_3
    else if (t <= 1.8d-142) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = t / (l / Math.sqrt(x));
	double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double t_3 = -t_2;
	double tmp;
	if (t <= -5.2e-104) {
		tmp = t_3;
	} else if (t <= -7e-197) {
		tmp = t_1;
	} else if (t <= -1.8e-302) {
		tmp = t_3;
	} else if (t <= 1.8e-142) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = t / (l / math.sqrt(x))
	t_2 = math.sqrt(((x + -1.0) / (x + 1.0)))
	t_3 = -t_2
	tmp = 0
	if t <= -5.2e-104:
		tmp = t_3
	elif t <= -7e-197:
		tmp = t_1
	elif t <= -1.8e-302:
		tmp = t_3
	elif t <= 1.8e-142:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, l, t)
	t_1 = Float64(t / Float64(l / sqrt(x)))
	t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	t_3 = Float64(-t_2)
	tmp = 0.0
	if (t <= -5.2e-104)
		tmp = t_3;
	elseif (t <= -7e-197)
		tmp = t_1;
	elseif (t <= -1.8e-302)
		tmp = t_3;
	elseif (t <= 1.8e-142)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = t / (l / sqrt(x));
	t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	t_3 = -t_2;
	tmp = 0.0;
	if (t <= -5.2e-104)
		tmp = t_3;
	elseif (t <= -7e-197)
		tmp = t_1;
	elseif (t <= -1.8e-302)
		tmp = t_3;
	elseif (t <= 1.8e-142)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = (-t$95$2)}, If[LessEqual[t, -5.2e-104], t$95$3, If[LessEqual[t, -7e-197], t$95$1, If[LessEqual[t, -1.8e-302], t$95$3, If[LessEqual[t, 1.8e-142], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{\frac{\ell}{\sqrt{x}}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := -t_2\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{-104}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -7 \cdot 10^{-197}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 1.8 \cdot 10^{-142}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.20000000000000005e-104 or -6.9999999999999996e-197 < t < -1.8e-302

    1. Initial program 32.7%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.7%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.7%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 22.6%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative22.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/37.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg37.8%

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow237.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative37.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified37.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in t around -inf 82.9%

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    8. Step-by-step derivation
      1. mul-1-neg82.9%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg82.9%

        \[\leadsto -\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}} \]
      3. metadata-eval82.9%

        \[\leadsto -\sqrt{\frac{x + \color{blue}{-1}}{1 + x}} \]
    9. Simplified82.9%

      \[\leadsto \color{blue}{-\sqrt{\frac{x + -1}{1 + x}}} \]

    if -5.20000000000000005e-104 < t < -6.9999999999999996e-197 or -1.8e-302 < t < 1.8e-142

    1. Initial program 10.6%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/10.6%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified10.6%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative10.6%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num10.6%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv10.6%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv10.6%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval10.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg10.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr13.2%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified13.2%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 67.5%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{2}}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{2}}} \]
      2. fma-def67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, 2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)} + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      3. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\color{blue}{t \cdot t}}{x}, 2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      4. fma-def67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \color{blue}{\mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)}\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      5. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, \color{blue}{t \cdot t}, \frac{{\ell}^{2}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      6. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      7. metadata-eval67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      8. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{2 \cdot \color{blue}{\left(t \cdot t\right)} + {\ell}^{2}}{x}}{2}}} \]
      9. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{2 \cdot \left(t \cdot t\right) + \color{blue}{\ell \cdot \ell}}{x}}{2}}} \]
      10. fma-udef67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x}}{2}}} \]
      11. *-lft-identity67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}{2}}} \]
      12. fma-udef67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{2 \cdot \left(t \cdot t\right) + \ell \cdot \ell}}{x}}{2}}} \]
      13. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot \color{blue}{{t}^{2}} + \ell \cdot \ell}{x}}{2}}} \]
      14. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot {t}^{2} + \color{blue}{{\ell}^{2}}}{x}}{2}}} \]
    10. Simplified67.5%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}{2}}} \]
    11. Taylor expanded in t around 0 47.9%

      \[\leadsto \frac{t}{\color{blue}{\left(\ell \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)\right) \cdot \sqrt{\frac{1}{x}}}} \]
    12. Step-by-step derivation
      1. associate-*l*47.9%

        \[\leadsto \frac{t}{\color{blue}{\ell \cdot \left(\left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1}{x}}\right)}} \]
      2. *-commutative47.9%

        \[\leadsto \frac{t}{\ell \cdot \left(\color{blue}{\left(\sqrt{2} \cdot \sqrt{0.5}\right)} \cdot \sqrt{\frac{1}{x}}\right)} \]
      3. associate-*l*48.0%

        \[\leadsto \frac{t}{\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)}} \]
    13. Simplified48.0%

      \[\leadsto \frac{t}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)}} \]
    14. Step-by-step derivation
      1. expm1-log1p-u39.1%

        \[\leadsto \frac{t}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot \left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)\right)\right)}} \]
      2. expm1-udef24.9%

        \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\ell \cdot \left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)\right)} - 1}} \]
      3. associate-*r*24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{0.5}\right) \cdot \sqrt{\frac{1}{x}}\right)}\right)} - 1} \]
      4. sqrt-unprod24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \left(\color{blue}{\sqrt{2 \cdot 0.5}} \cdot \sqrt{\frac{1}{x}}\right)\right)} - 1} \]
      5. metadata-eval24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \left(\sqrt{\color{blue}{1}} \cdot \sqrt{\frac{1}{x}}\right)\right)} - 1} \]
      6. metadata-eval24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \left(\color{blue}{1} \cdot \sqrt{\frac{1}{x}}\right)\right)} - 1} \]
      7. *-un-lft-identity24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \color{blue}{\sqrt{\frac{1}{x}}}\right)} - 1} \]
      8. add-sqr-sqrt24.3%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{\frac{1}{x}}\right)} - 1} \]
      9. sqrt-prod35.6%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\ell \cdot \ell}} \cdot \sqrt{\frac{1}{x}}\right)} - 1} \]
      10. sqrt-prod35.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\left(\ell \cdot \ell\right) \cdot \frac{1}{x}}}\right)} - 1} \]
      11. div-inv35.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\frac{\ell \cdot \ell}{x}}}\right)} - 1} \]
      12. sqrt-div35.6%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\frac{\sqrt{\ell \cdot \ell}}{\sqrt{x}}}\right)} - 1} \]
      13. sqrt-prod24.3%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}{\sqrt{x}}\right)} - 1} \]
      14. add-sqr-sqrt24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\frac{\color{blue}{\ell}}{\sqrt{x}}\right)} - 1} \]
    15. Applied egg-rr24.9%

      \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\frac{\ell}{\sqrt{x}}\right)} - 1}} \]
    16. Step-by-step derivation
      1. expm1-def39.2%

        \[\leadsto \frac{t}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\ell}{\sqrt{x}}\right)\right)}} \]
      2. expm1-log1p48.2%

        \[\leadsto \frac{t}{\color{blue}{\frac{\ell}{\sqrt{x}}}} \]
    17. Simplified48.2%

      \[\leadsto \frac{t}{\color{blue}{\frac{\ell}{\sqrt{x}}}} \]

    if 1.8e-142 < t

    1. Initial program 38.4%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/38.4%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified38.4%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 36.3%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative36.3%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow249.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified49.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 83.1%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{-104}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-197}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-142}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 4: 74.5% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{-t}\\ t_2 := \sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{if}\;t \leq -1.02 \cdot 10^{-145}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-197}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.36 \cdot 10^{-142}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ t (- t))) (t_2 (* (sqrt x) (/ t l))))
   (if (<= t -1.02e-145)
     t_1
     (if (<= t -4.1e-197)
       t_2
       (if (<= t -1.8e-302)
         t_1
         (if (<= t 1.36e-142) t_2 (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))))))
double code(double x, double l, double t) {
	double t_1 = t / -t;
	double t_2 = sqrt(x) * (t / l);
	double tmp;
	if (t <= -1.02e-145) {
		tmp = t_1;
	} else if (t <= -4.1e-197) {
		tmp = t_2;
	} else if (t <= -1.8e-302) {
		tmp = t_1;
	} else if (t <= 1.36e-142) {
		tmp = t_2;
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t / -t
    t_2 = sqrt(x) * (t / l)
    if (t <= (-1.02d-145)) then
        tmp = t_1
    else if (t <= (-4.1d-197)) then
        tmp = t_2
    else if (t <= (-1.8d-302)) then
        tmp = t_1
    else if (t <= 1.36d-142) then
        tmp = t_2
    else
        tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = t / -t;
	double t_2 = Math.sqrt(x) * (t / l);
	double tmp;
	if (t <= -1.02e-145) {
		tmp = t_1;
	} else if (t <= -4.1e-197) {
		tmp = t_2;
	} else if (t <= -1.8e-302) {
		tmp = t_1;
	} else if (t <= 1.36e-142) {
		tmp = t_2;
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
def code(x, l, t):
	t_1 = t / -t
	t_2 = math.sqrt(x) * (t / l)
	tmp = 0
	if t <= -1.02e-145:
		tmp = t_1
	elif t <= -4.1e-197:
		tmp = t_2
	elif t <= -1.8e-302:
		tmp = t_1
	elif t <= 1.36e-142:
		tmp = t_2
	else:
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x))
	return tmp
function code(x, l, t)
	t_1 = Float64(t / Float64(-t))
	t_2 = Float64(sqrt(x) * Float64(t / l))
	tmp = 0.0
	if (t <= -1.02e-145)
		tmp = t_1;
	elseif (t <= -4.1e-197)
		tmp = t_2;
	elseif (t <= -1.8e-302)
		tmp = t_1;
	elseif (t <= 1.36e-142)
		tmp = t_2;
	else
		tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = t / -t;
	t_2 = sqrt(x) * (t / l);
	tmp = 0.0;
	if (t <= -1.02e-145)
		tmp = t_1;
	elseif (t <= -4.1e-197)
		tmp = t_2;
	elseif (t <= -1.8e-302)
		tmp = t_1;
	elseif (t <= 1.36e-142)
		tmp = t_2;
	else
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(t / (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.02e-145], t$95$1, If[LessEqual[t, -4.1e-197], t$95$2, If[LessEqual[t, -1.8e-302], t$95$1, If[LessEqual[t, 1.36e-142], t$95$2, N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{-t}\\
t_2 := \sqrt{x} \cdot \frac{t}{\ell}\\
\mathbf{if}\;t \leq -1.02 \cdot 10^{-145}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.1 \cdot 10^{-197}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.36 \cdot 10^{-142}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.01999999999999993e-145 or -4.1e-197 < t < -1.8e-302

    1. Initial program 32.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.3%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.3%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative32.3%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num32.3%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv32.3%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv32.4%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval32.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg32.4%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/20.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg20.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval20.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr20.6%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative20.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative20.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative20.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative20.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified20.6%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 37.6%

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

        \[\leadsto \frac{t}{\sqrt{\frac{2 \cdot \color{blue}{\left(t \cdot t\right)}}{2}}} \]
    10. Simplified37.6%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{2 \cdot \left(t \cdot t\right)}}{2}}} \]
    11. Taylor expanded in t around -inf 79.9%

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot t}} \]
    12. Step-by-step derivation
      1. mul-1-neg79.9%

        \[\leadsto \frac{t}{\color{blue}{-t}} \]
    13. Simplified79.9%

      \[\leadsto \frac{t}{\color{blue}{-t}} \]

    if -1.01999999999999993e-145 < t < -4.1e-197 or -1.8e-302 < t < 1.35999999999999993e-142

    1. Initial program 7.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/7.5%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified7.5%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative7.5%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num7.5%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv7.5%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv7.5%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval7.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg7.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/10.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg10.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval10.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr10.5%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative10.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative10.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative10.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative10.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified10.5%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 68.7%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{2}}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv68.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{2}}} \]
      2. fma-def68.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, 2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)} + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      3. unpow268.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\color{blue}{t \cdot t}}{x}, 2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      4. fma-def68.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \color{blue}{\mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)}\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      5. unpow268.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, \color{blue}{t \cdot t}, \frac{{\ell}^{2}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      6. unpow268.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      7. metadata-eval68.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      8. unpow268.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{2 \cdot \color{blue}{\left(t \cdot t\right)} + {\ell}^{2}}{x}}{2}}} \]
      9. unpow268.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{2 \cdot \left(t \cdot t\right) + \color{blue}{\ell \cdot \ell}}{x}}{2}}} \]
      10. fma-udef68.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x}}{2}}} \]
      11. *-lft-identity68.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}{2}}} \]
      12. fma-udef68.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{2 \cdot \left(t \cdot t\right) + \ell \cdot \ell}}{x}}{2}}} \]
      13. unpow268.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot \color{blue}{{t}^{2}} + \ell \cdot \ell}{x}}{2}}} \]
      14. unpow268.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot {t}^{2} + \color{blue}{{\ell}^{2}}}{x}}{2}}} \]
    10. Simplified68.7%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}{2}}} \]
    11. Taylor expanded in l around inf 68.7%

      \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{{\ell}^{2}}{x}}}{2}}} \]
    12. Step-by-step derivation
      1. unpow268.7%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\ell \cdot \ell}}{x}}{2}}} \]
    13. Simplified68.7%

      \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\ell \cdot \ell}{x}}}{2}}} \]
    14. Taylor expanded in t around 0 49.0%

      \[\leadsto \color{blue}{\frac{t}{\ell} \cdot \sqrt{x}} \]

    if 1.35999999999999993e-142 < t

    1. Initial program 38.4%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/38.4%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified38.4%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 36.3%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative36.3%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow249.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified49.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in x around inf 82.3%

      \[\leadsto \color{blue}{\left(1 + 0.5 \cdot \frac{1}{{x}^{2}}\right) - \frac{1}{x}} \]
    8. Step-by-step derivation
      1. associate--l+82.3%

        \[\leadsto \color{blue}{1 + \left(0.5 \cdot \frac{1}{{x}^{2}} - \frac{1}{x}\right)} \]
      2. associate-*r/82.3%

        \[\leadsto 1 + \left(\color{blue}{\frac{0.5 \cdot 1}{{x}^{2}}} - \frac{1}{x}\right) \]
      3. metadata-eval82.3%

        \[\leadsto 1 + \left(\frac{\color{blue}{0.5}}{{x}^{2}} - \frac{1}{x}\right) \]
      4. unpow282.3%

        \[\leadsto 1 + \left(\frac{0.5}{\color{blue}{x \cdot x}} - \frac{1}{x}\right) \]
    9. Simplified82.3%

      \[\leadsto \color{blue}{1 + \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification76.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{-145}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-197}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{elif}\;t \leq 1.36 \cdot 10^{-142}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]

Alternative 5: 74.2% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{-t}\\ t_2 := \frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{if}\;t \leq -6.6 \cdot 10^{-104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.02 \cdot 10^{-196}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-140}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ t (- t))) (t_2 (/ t (/ l (sqrt x)))))
   (if (<= t -6.6e-104)
     t_1
     (if (<= t -1.02e-196)
       t_2
       (if (<= t -1.8e-302)
         t_1
         (if (<= t 6e-140) t_2 (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))))))
double code(double x, double l, double t) {
	double t_1 = t / -t;
	double t_2 = t / (l / sqrt(x));
	double tmp;
	if (t <= -6.6e-104) {
		tmp = t_1;
	} else if (t <= -1.02e-196) {
		tmp = t_2;
	} else if (t <= -1.8e-302) {
		tmp = t_1;
	} else if (t <= 6e-140) {
		tmp = t_2;
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t / -t
    t_2 = t / (l / sqrt(x))
    if (t <= (-6.6d-104)) then
        tmp = t_1
    else if (t <= (-1.02d-196)) then
        tmp = t_2
    else if (t <= (-1.8d-302)) then
        tmp = t_1
    else if (t <= 6d-140) then
        tmp = t_2
    else
        tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = t / -t;
	double t_2 = t / (l / Math.sqrt(x));
	double tmp;
	if (t <= -6.6e-104) {
		tmp = t_1;
	} else if (t <= -1.02e-196) {
		tmp = t_2;
	} else if (t <= -1.8e-302) {
		tmp = t_1;
	} else if (t <= 6e-140) {
		tmp = t_2;
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
def code(x, l, t):
	t_1 = t / -t
	t_2 = t / (l / math.sqrt(x))
	tmp = 0
	if t <= -6.6e-104:
		tmp = t_1
	elif t <= -1.02e-196:
		tmp = t_2
	elif t <= -1.8e-302:
		tmp = t_1
	elif t <= 6e-140:
		tmp = t_2
	else:
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x))
	return tmp
function code(x, l, t)
	t_1 = Float64(t / Float64(-t))
	t_2 = Float64(t / Float64(l / sqrt(x)))
	tmp = 0.0
	if (t <= -6.6e-104)
		tmp = t_1;
	elseif (t <= -1.02e-196)
		tmp = t_2;
	elseif (t <= -1.8e-302)
		tmp = t_1;
	elseif (t <= 6e-140)
		tmp = t_2;
	else
		tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = t / -t;
	t_2 = t / (l / sqrt(x));
	tmp = 0.0;
	if (t <= -6.6e-104)
		tmp = t_1;
	elseif (t <= -1.02e-196)
		tmp = t_2;
	elseif (t <= -1.8e-302)
		tmp = t_1;
	elseif (t <= 6e-140)
		tmp = t_2;
	else
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(t / (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.6e-104], t$95$1, If[LessEqual[t, -1.02e-196], t$95$2, If[LessEqual[t, -1.8e-302], t$95$1, If[LessEqual[t, 6e-140], t$95$2, N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{-t}\\
t_2 := \frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{-104}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.02 \cdot 10^{-196}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 6 \cdot 10^{-140}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.60000000000000004e-104 or -1.0200000000000001e-196 < t < -1.8e-302

    1. Initial program 32.7%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.7%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.7%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative32.7%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num32.7%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv32.7%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv32.9%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval32.9%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg32.9%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr20.3%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative20.3%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified20.3%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 37.1%

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

        \[\leadsto \frac{t}{\sqrt{\frac{2 \cdot \color{blue}{\left(t \cdot t\right)}}{2}}} \]
    10. Simplified37.1%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{2 \cdot \left(t \cdot t\right)}}{2}}} \]
    11. Taylor expanded in t around -inf 82.0%

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot t}} \]
    12. Step-by-step derivation
      1. mul-1-neg82.0%

        \[\leadsto \frac{t}{\color{blue}{-t}} \]
    13. Simplified82.0%

      \[\leadsto \frac{t}{\color{blue}{-t}} \]

    if -6.60000000000000004e-104 < t < -1.0200000000000001e-196 or -1.8e-302 < t < 6.00000000000000037e-140

    1. Initial program 10.6%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/10.6%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified10.6%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative10.6%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num10.6%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv10.6%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv10.6%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval10.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg10.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr13.2%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative13.2%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified13.2%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 67.5%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{2}}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{2}}} \]
      2. fma-def67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, 2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)} + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      3. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\color{blue}{t \cdot t}}{x}, 2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      4. fma-def67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \color{blue}{\mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)}\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      5. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, \color{blue}{t \cdot t}, \frac{{\ell}^{2}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      6. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1\right) \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      7. metadata-eval67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{2}}} \]
      8. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{2 \cdot \color{blue}{\left(t \cdot t\right)} + {\ell}^{2}}{x}}{2}}} \]
      9. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{2 \cdot \left(t \cdot t\right) + \color{blue}{\ell \cdot \ell}}{x}}{2}}} \]
      10. fma-udef67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + 1 \cdot \frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x}}{2}}} \]
      11. *-lft-identity67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}{2}}} \]
      12. fma-udef67.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{2 \cdot \left(t \cdot t\right) + \ell \cdot \ell}}{x}}{2}}} \]
      13. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot \color{blue}{{t}^{2}} + \ell \cdot \ell}{x}}{2}}} \]
      14. unpow267.5%

        \[\leadsto \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot {t}^{2} + \color{blue}{{\ell}^{2}}}{x}}{2}}} \]
    10. Simplified67.5%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}{2}}} \]
    11. Taylor expanded in t around 0 47.9%

      \[\leadsto \frac{t}{\color{blue}{\left(\ell \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)\right) \cdot \sqrt{\frac{1}{x}}}} \]
    12. Step-by-step derivation
      1. associate-*l*47.9%

        \[\leadsto \frac{t}{\color{blue}{\ell \cdot \left(\left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1}{x}}\right)}} \]
      2. *-commutative47.9%

        \[\leadsto \frac{t}{\ell \cdot \left(\color{blue}{\left(\sqrt{2} \cdot \sqrt{0.5}\right)} \cdot \sqrt{\frac{1}{x}}\right)} \]
      3. associate-*l*48.0%

        \[\leadsto \frac{t}{\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)}} \]
    13. Simplified48.0%

      \[\leadsto \frac{t}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)}} \]
    14. Step-by-step derivation
      1. expm1-log1p-u39.1%

        \[\leadsto \frac{t}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot \left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)\right)\right)}} \]
      2. expm1-udef24.9%

        \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\ell \cdot \left(\sqrt{2} \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{1}{x}}\right)\right)\right)} - 1}} \]
      3. associate-*r*24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{0.5}\right) \cdot \sqrt{\frac{1}{x}}\right)}\right)} - 1} \]
      4. sqrt-unprod24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \left(\color{blue}{\sqrt{2 \cdot 0.5}} \cdot \sqrt{\frac{1}{x}}\right)\right)} - 1} \]
      5. metadata-eval24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \left(\sqrt{\color{blue}{1}} \cdot \sqrt{\frac{1}{x}}\right)\right)} - 1} \]
      6. metadata-eval24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \left(\color{blue}{1} \cdot \sqrt{\frac{1}{x}}\right)\right)} - 1} \]
      7. *-un-lft-identity24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\ell \cdot \color{blue}{\sqrt{\frac{1}{x}}}\right)} - 1} \]
      8. add-sqr-sqrt24.3%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{\frac{1}{x}}\right)} - 1} \]
      9. sqrt-prod35.6%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\ell \cdot \ell}} \cdot \sqrt{\frac{1}{x}}\right)} - 1} \]
      10. sqrt-prod35.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\left(\ell \cdot \ell\right) \cdot \frac{1}{x}}}\right)} - 1} \]
      11. div-inv35.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\frac{\ell \cdot \ell}{x}}}\right)} - 1} \]
      12. sqrt-div35.6%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\color{blue}{\frac{\sqrt{\ell \cdot \ell}}{\sqrt{x}}}\right)} - 1} \]
      13. sqrt-prod24.3%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}{\sqrt{x}}\right)} - 1} \]
      14. add-sqr-sqrt24.9%

        \[\leadsto \frac{t}{e^{\mathsf{log1p}\left(\frac{\color{blue}{\ell}}{\sqrt{x}}\right)} - 1} \]
    15. Applied egg-rr24.9%

      \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\frac{\ell}{\sqrt{x}}\right)} - 1}} \]
    16. Step-by-step derivation
      1. expm1-def39.2%

        \[\leadsto \frac{t}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\ell}{\sqrt{x}}\right)\right)}} \]
      2. expm1-log1p48.2%

        \[\leadsto \frac{t}{\color{blue}{\frac{\ell}{\sqrt{x}}}} \]
    17. Simplified48.2%

      \[\leadsto \frac{t}{\color{blue}{\frac{\ell}{\sqrt{x}}}} \]

    if 6.00000000000000037e-140 < t

    1. Initial program 38.4%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/38.4%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified38.4%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 36.3%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative36.3%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow249.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative49.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified49.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in x around inf 82.3%

      \[\leadsto \color{blue}{\left(1 + 0.5 \cdot \frac{1}{{x}^{2}}\right) - \frac{1}{x}} \]
    8. Step-by-step derivation
      1. associate--l+82.3%

        \[\leadsto \color{blue}{1 + \left(0.5 \cdot \frac{1}{{x}^{2}} - \frac{1}{x}\right)} \]
      2. associate-*r/82.3%

        \[\leadsto 1 + \left(\color{blue}{\frac{0.5 \cdot 1}{{x}^{2}}} - \frac{1}{x}\right) \]
      3. metadata-eval82.3%

        \[\leadsto 1 + \left(\frac{\color{blue}{0.5}}{{x}^{2}} - \frac{1}{x}\right) \]
      4. unpow282.3%

        \[\leadsto 1 + \left(\frac{0.5}{\color{blue}{x \cdot x}} - \frac{1}{x}\right) \]
    9. Simplified82.3%

      \[\leadsto \color{blue}{1 + \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification76.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{-104}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{elif}\;t \leq -1.02 \cdot 10^{-196}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-140}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]

Alternative 6: 76.4% accurate, 17.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -2e-310) (/ t (- t)) (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-310) {
		tmp = t / -t;
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2d-310)) then
        tmp = t / -t
    else
        tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-310) {
		tmp = t / -t;
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -2e-310:
		tmp = t / -t
	else:
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -2e-310)
		tmp = Float64(t / Float64(-t));
	else
		tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -2e-310)
		tmp = t / -t;
	else
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -2e-310], N[(t / (-t)), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{t}{-t}\\

\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\


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

    1. Initial program 30.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/30.5%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified30.5%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative30.5%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num30.5%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv30.5%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv30.6%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval30.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg30.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr19.8%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified19.8%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 35.5%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{2 \cdot {t}^{2}}}{2}}} \]
    9. Step-by-step derivation
      1. unpow235.5%

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

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{2 \cdot \left(t \cdot t\right)}}{2}}} \]
    11. Taylor expanded in t around -inf 74.3%

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot t}} \]
    12. Step-by-step derivation
      1. mul-1-neg74.3%

        \[\leadsto \frac{t}{\color{blue}{-t}} \]
    13. Simplified74.3%

      \[\leadsto \frac{t}{\color{blue}{-t}} \]

    if -1.999999999999994e-310 < t

    1. Initial program 32.4%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.4%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.4%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 30.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative30.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow241.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified41.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in x around inf 71.6%

      \[\leadsto \color{blue}{\left(1 + 0.5 \cdot \frac{1}{{x}^{2}}\right) - \frac{1}{x}} \]
    8. Step-by-step derivation
      1. associate--l+71.6%

        \[\leadsto \color{blue}{1 + \left(0.5 \cdot \frac{1}{{x}^{2}} - \frac{1}{x}\right)} \]
      2. associate-*r/71.6%

        \[\leadsto 1 + \left(\color{blue}{\frac{0.5 \cdot 1}{{x}^{2}}} - \frac{1}{x}\right) \]
      3. metadata-eval71.6%

        \[\leadsto 1 + \left(\frac{\color{blue}{0.5}}{{x}^{2}} - \frac{1}{x}\right) \]
      4. unpow271.6%

        \[\leadsto 1 + \left(\frac{0.5}{\color{blue}{x \cdot x}} - \frac{1}{x}\right) \]
    9. Simplified71.6%

      \[\leadsto \color{blue}{1 + \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification73.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]

Alternative 7: 76.3% accurate, 31.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -2e-310) (/ t (- t)) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-310) {
		tmp = t / -t;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2d-310)) then
        tmp = t / -t
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-310) {
		tmp = t / -t;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -2e-310:
		tmp = t / -t
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -2e-310)
		tmp = Float64(t / Float64(-t));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -2e-310)
		tmp = t / -t;
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -2e-310], N[(t / (-t)), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{t}{-t}\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\


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

    1. Initial program 30.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/30.5%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified30.5%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative30.5%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num30.5%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv30.5%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv30.6%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval30.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg30.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr19.8%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified19.8%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 35.5%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{2 \cdot {t}^{2}}}{2}}} \]
    9. Step-by-step derivation
      1. unpow235.5%

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

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{2 \cdot \left(t \cdot t\right)}}{2}}} \]
    11. Taylor expanded in t around -inf 74.3%

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot t}} \]
    12. Step-by-step derivation
      1. mul-1-neg74.3%

        \[\leadsto \frac{t}{\color{blue}{-t}} \]
    13. Simplified74.3%

      \[\leadsto \frac{t}{\color{blue}{-t}} \]

    if -1.999999999999994e-310 < t

    1. Initial program 32.4%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.4%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.4%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 30.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative30.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow241.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified41.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in x around inf 71.4%

      \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 8: 75.9% accurate, 37.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x l t) :precision binary64 (if (<= t -2e-310) (/ t (- t)) 1.0))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-310) {
		tmp = t / -t;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2d-310)) then
        tmp = t / -t
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-310) {
		tmp = t / -t;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -2e-310:
		tmp = t / -t
	else:
		tmp = 1.0
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -2e-310)
		tmp = Float64(t / Float64(-t));
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -2e-310)
		tmp = t / -t;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -2e-310], N[(t / (-t)), $MachinePrecision], 1.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{t}{-t}\\

\mathbf{else}:\\
\;\;\;\;1\\


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

    1. Initial program 30.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/30.5%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified30.5%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative30.5%

        \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
      2. clear-num30.5%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      3. un-div-inv30.5%

        \[\leadsto \color{blue}{\frac{t}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \]
      4. sqrt-undiv30.6%

        \[\leadsto \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}} \]
      5. metadata-eval30.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{\left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      6. sub-neg30.6%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x - 1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}} \]
      7. associate-*l/19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x - 1}} - \ell \cdot \ell}{2}}} \]
      8. sub-neg19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\color{blue}{x + \left(-1\right)}} - \ell \cdot \ell}{2}}} \]
      9. metadata-eval19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + \color{blue}{-1}} - \ell \cdot \ell}{2}}} \]
    5. Applied egg-rr19.8%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\left(1 + x\right)} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}{2}}} \]
      2. *-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(1 + x\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      3. +-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \color{blue}{\left(x + 1\right)}}{x + -1} - \ell \cdot \ell}{2}}} \]
      4. +-commutative19.8%

        \[\leadsto \frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}} - \ell \cdot \ell}{2}}} \]
    7. Simplified19.8%

      \[\leadsto \color{blue}{\frac{t}{\sqrt{\frac{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \left(x + 1\right)}{-1 + x} - \ell \cdot \ell}{2}}}} \]
    8. Taylor expanded in x around inf 35.5%

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{2 \cdot {t}^{2}}}{2}}} \]
    9. Step-by-step derivation
      1. unpow235.5%

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

      \[\leadsto \frac{t}{\sqrt{\frac{\color{blue}{2 \cdot \left(t \cdot t\right)}}{2}}} \]
    11. Taylor expanded in t around -inf 74.3%

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot t}} \]
    12. Step-by-step derivation
      1. mul-1-neg74.3%

        \[\leadsto \frac{t}{\color{blue}{-t}} \]
    13. Simplified74.3%

      \[\leadsto \frac{t}{\color{blue}{-t}} \]

    if -1.999999999999994e-310 < t

    1. Initial program 32.4%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.4%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.4%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 30.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative30.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow241.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative41.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified41.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in x around inf 70.8%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 9: 38.7% accurate, 225.0× speedup?

\[\begin{array}{l} \\ 1 \end{array} \]
(FPCore (x l t) :precision binary64 1.0)
double code(double x, double l, double t) {
	return 1.0;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    code = 1.0d0
end function
public static double code(double x, double l, double t) {
	return 1.0;
}
def code(x, l, t):
	return 1.0
function code(x, l, t)
	return 1.0
end
function tmp = code(x, l, t)
	tmp = 1.0;
end
code[x_, l_, t_] := 1.0
\begin{array}{l}

\\
1
\end{array}
Derivation
  1. Initial program 31.4%

    \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
  2. Step-by-step derivation
    1. associate-*l/31.4%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
  3. Simplified31.4%

    \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
  4. Taylor expanded in t around inf 26.7%

    \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
  5. Step-by-step derivation
    1. +-commutative26.7%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
    2. associate-*r/38.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
    3. sub-neg38.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
    4. metadata-eval38.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
    5. unpow238.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
    6. +-commutative38.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
  6. Simplified38.8%

    \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
  7. Taylor expanded in x around inf 35.0%

    \[\leadsto \color{blue}{1} \]
  8. Final simplification35.0%

    \[\leadsto 1 \]

Reproduce

?
herbie shell --seed 2023292 
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  :precision binary64
  (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))