Toniolo and Linder, Equation (7)

Percentage Accurate: 33.8% → 79.4%
Time: 17.4s
Alternatives: 14
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 14 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: 33.8% 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: 79.4% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{1}{x + -1} + \frac{1}{x}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \leq 1.3 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;l_m \leq 7.5 \cdot 10^{+230}:\\ \;\;\;\;t_m \cdot \frac{\sqrt{2}}{l_m \cdot \sqrt{t_2}}\\ \mathbf{elif}\;l_m \leq 4.9 \cdot 10^{+272}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;t_m \cdot \left(\frac{\sqrt{2}}{l_m} \cdot \sqrt{\frac{1}{t_2}}\right)\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (let* ((t_2 (+ (/ 1.0 (+ x -1.0)) (/ 1.0 x))))
   (*
    t_s
    (if (<= l_m 1.3e+152)
      (sqrt (/ (+ x -1.0) (+ x 1.0)))
      (if (<= l_m 7.5e+230)
        (* t_m (/ (sqrt 2.0) (* l_m (sqrt t_2))))
        (if (<= l_m 4.9e+272)
          (+ 1.0 (/ -1.0 x))
          (* t_m (* (/ (sqrt 2.0) l_m) (sqrt (/ 1.0 t_2))))))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double t_2 = (1.0 / (x + -1.0)) + (1.0 / x);
	double tmp;
	if (l_m <= 1.3e+152) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else if (l_m <= 7.5e+230) {
		tmp = t_m * (sqrt(2.0) / (l_m * sqrt(t_2)));
	} else if (l_m <= 4.9e+272) {
		tmp = 1.0 + (-1.0 / x);
	} else {
		tmp = t_m * ((sqrt(2.0) / l_m) * sqrt((1.0 / t_2)));
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: t_2
    real(8) :: tmp
    t_2 = (1.0d0 / (x + (-1.0d0))) + (1.0d0 / x)
    if (l_m <= 1.3d+152) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (l_m <= 7.5d+230) then
        tmp = t_m * (sqrt(2.0d0) / (l_m * sqrt(t_2)))
    else if (l_m <= 4.9d+272) then
        tmp = 1.0d0 + ((-1.0d0) / x)
    else
        tmp = t_m * ((sqrt(2.0d0) / l_m) * sqrt((1.0d0 / t_2)))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double t_2 = (1.0 / (x + -1.0)) + (1.0 / x);
	double tmp;
	if (l_m <= 1.3e+152) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (l_m <= 7.5e+230) {
		tmp = t_m * (Math.sqrt(2.0) / (l_m * Math.sqrt(t_2)));
	} else if (l_m <= 4.9e+272) {
		tmp = 1.0 + (-1.0 / x);
	} else {
		tmp = t_m * ((Math.sqrt(2.0) / l_m) * Math.sqrt((1.0 / t_2)));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	t_2 = (1.0 / (x + -1.0)) + (1.0 / x)
	tmp = 0
	if l_m <= 1.3e+152:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	elif l_m <= 7.5e+230:
		tmp = t_m * (math.sqrt(2.0) / (l_m * math.sqrt(t_2)))
	elif l_m <= 4.9e+272:
		tmp = 1.0 + (-1.0 / x)
	else:
		tmp = t_m * ((math.sqrt(2.0) / l_m) * math.sqrt((1.0 / t_2)))
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	t_2 = Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(1.0 / x))
	tmp = 0.0
	if (l_m <= 1.3e+152)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	elseif (l_m <= 7.5e+230)
		tmp = Float64(t_m * Float64(sqrt(2.0) / Float64(l_m * sqrt(t_2))));
	elseif (l_m <= 4.9e+272)
		tmp = Float64(1.0 + Float64(-1.0 / x));
	else
		tmp = Float64(t_m * Float64(Float64(sqrt(2.0) / l_m) * sqrt(Float64(1.0 / t_2))));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	t_2 = (1.0 / (x + -1.0)) + (1.0 / x);
	tmp = 0.0;
	if (l_m <= 1.3e+152)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	elseif (l_m <= 7.5e+230)
		tmp = t_m * (sqrt(2.0) / (l_m * sqrt(t_2)));
	elseif (l_m <= 4.9e+272)
		tmp = 1.0 + (-1.0 / x);
	else
		tmp = t_m * ((sqrt(2.0) / l_m) * sqrt((1.0 / t_2)));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[l$95$m, 1.3e+152], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 7.5e+230], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l$95$m * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 4.9e+272], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(N[(N[Sqrt[2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \frac{1}{x + -1} + \frac{1}{x}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 1.3 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;l_m \leq 7.5 \cdot 10^{+230}:\\
\;\;\;\;t_m \cdot \frac{\sqrt{2}}{l_m \cdot \sqrt{t_2}}\\

\mathbf{elif}\;l_m \leq 4.9 \cdot 10^{+272}:\\
\;\;\;\;1 + \frac{-1}{x}\\

\mathbf{else}:\\
\;\;\;\;t_m \cdot \left(\frac{\sqrt{2}}{l_m} \cdot \sqrt{\frac{1}{t_2}}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 1.3e152

    1. Initial program 37.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. Simplified37.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} \]
    3. Taylor expanded in t around inf 40.9%

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

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

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

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

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

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

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

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

    if 1.3e152 < l < 7.5000000000000004e230

    1. Initial program 0.2%

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

      \[\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} \]
    3. Taylor expanded in l around inf 3.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{-1 + x} + \color{blue}{\frac{1}{x}}}} \cdot t \]

    if 7.5000000000000004e230 < l < 4.9000000000000002e272

    1. Initial program 0.0%

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

      \[\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} \]
    3. Taylor expanded in t around inf 50.9%

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

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

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

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

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

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

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

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

    if 4.9000000000000002e272 < l

    1. Initial program 0.0%

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

      \[\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} \]
    3. Taylor expanded in l around inf 1.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.3 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+230}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}\\ \mathbf{elif}\;\ell \leq 4.9 \cdot 10^{+272}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{1}{x + -1} + \frac{1}{x}}}\right)\\ \end{array} \]

Alternative 2: 80.5% accurate, 0.7× speedup?

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

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \cdot l_m \leq 4 \cdot 10^{+293}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{l_m \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{{x}^{2}}\right)}} \cdot t_m\\


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

    1. Initial program 41.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. Simplified41.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} \]
    3. Taylor expanded in t around inf 43.5%

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

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

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

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

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

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

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

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

    if 3.9999999999999997e293 < (*.f64 l l)

    1. Initial program 0.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. Simplified0.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} \]
    3. Taylor expanded in l around inf 6.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 80.5% accurate, 0.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \cdot l_m \leq 4 \cdot 10^{+293}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{l_m} \cdot \left(t_m \cdot {\left(\frac{1}{x} + \left(\frac{1}{x + -1} + {x}^{-2}\right)\right)}^{-0.5}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= (* l_m l_m) 4e+293)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (*
     (/ (sqrt 2.0) l_m)
     (* t_m (pow (+ (/ 1.0 x) (+ (/ 1.0 (+ x -1.0)) (pow x -2.0))) -0.5))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if ((l_m * l_m) <= 4e+293) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = (sqrt(2.0) / l_m) * (t_m * pow(((1.0 / x) + ((1.0 / (x + -1.0)) + pow(x, -2.0))), -0.5));
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if ((l_m * l_m) <= 4d+293) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else
        tmp = (sqrt(2.0d0) / l_m) * (t_m * (((1.0d0 / x) + ((1.0d0 / (x + (-1.0d0))) + (x ** (-2.0d0)))) ** (-0.5d0)))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if ((l_m * l_m) <= 4e+293) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = (Math.sqrt(2.0) / l_m) * (t_m * Math.pow(((1.0 / x) + ((1.0 / (x + -1.0)) + Math.pow(x, -2.0))), -0.5));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if (l_m * l_m) <= 4e+293:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	else:
		tmp = (math.sqrt(2.0) / l_m) * (t_m * math.pow(((1.0 / x) + ((1.0 / (x + -1.0)) + math.pow(x, -2.0))), -0.5))
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (Float64(l_m * l_m) <= 4e+293)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(Float64(sqrt(2.0) / l_m) * Float64(t_m * (Float64(Float64(1.0 / x) + Float64(Float64(1.0 / Float64(x + -1.0)) + (x ^ -2.0))) ^ -0.5)));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if ((l_m * l_m) <= 4e+293)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	else
		tmp = (sqrt(2.0) / l_m) * (t_m * (((1.0 / x) + ((1.0 / (x + -1.0)) + (x ^ -2.0))) ^ -0.5));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 4e+293], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m * N[Power[N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[Power[x, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \cdot l_m \leq 4 \cdot 10^{+293}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{l_m} \cdot \left(t_m \cdot {\left(\frac{1}{x} + \left(\frac{1}{x + -1} + {x}^{-2}\right)\right)}^{-0.5}\right)\\


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

    1. Initial program 41.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. Simplified41.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} \]
    3. Taylor expanded in t around inf 43.5%

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

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

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

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

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

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

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

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

    if 3.9999999999999997e293 < (*.f64 l l)

    1. Initial program 0.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. Simplified0.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} \]
    3. Taylor expanded in l around inf 6.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{t \cdot \frac{{\left(\left(\frac{1}{x + -1} + \frac{1}{x}\right) + {x}^{-2}\right)}^{-0.5} \cdot \sqrt{2}}{\ell}}\right)} - 1 \]
      4. associate-/l*32.5%

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

        \[\leadsto e^{\mathsf{log1p}\left(t \cdot \frac{{\color{blue}{\left(\frac{1}{x + -1} + \left(\frac{1}{x} + {x}^{-2}\right)\right)}}^{-0.5}}{\frac{\ell}{\sqrt{2}}}\right)} - 1 \]
    10. Applied egg-rr32.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 80.5% accurate, 0.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \cdot l_m \leq 4 \cdot 10^{+293}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;t_m \cdot \frac{\sqrt{2} \cdot {\left({x}^{-2} + \left(\frac{1}{x + -1} + \frac{1}{x}\right)\right)}^{-0.5}}{l_m}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= (* l_m l_m) 4e+293)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (*
     t_m
     (/
      (*
       (sqrt 2.0)
       (pow (+ (pow x -2.0) (+ (/ 1.0 (+ x -1.0)) (/ 1.0 x))) -0.5))
      l_m)))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if ((l_m * l_m) <= 4e+293) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = t_m * ((sqrt(2.0) * pow((pow(x, -2.0) + ((1.0 / (x + -1.0)) + (1.0 / x))), -0.5)) / l_m);
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if ((l_m * l_m) <= 4d+293) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else
        tmp = t_m * ((sqrt(2.0d0) * (((x ** (-2.0d0)) + ((1.0d0 / (x + (-1.0d0))) + (1.0d0 / x))) ** (-0.5d0))) / l_m)
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if ((l_m * l_m) <= 4e+293) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = t_m * ((Math.sqrt(2.0) * Math.pow((Math.pow(x, -2.0) + ((1.0 / (x + -1.0)) + (1.0 / x))), -0.5)) / l_m);
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if (l_m * l_m) <= 4e+293:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	else:
		tmp = t_m * ((math.sqrt(2.0) * math.pow((math.pow(x, -2.0) + ((1.0 / (x + -1.0)) + (1.0 / x))), -0.5)) / l_m)
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (Float64(l_m * l_m) <= 4e+293)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(t_m * Float64(Float64(sqrt(2.0) * (Float64((x ^ -2.0) + Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(1.0 / x))) ^ -0.5)) / l_m));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if ((l_m * l_m) <= 4e+293)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	else
		tmp = t_m * ((sqrt(2.0) * (((x ^ -2.0) + ((1.0 / (x + -1.0)) + (1.0 / x))) ^ -0.5)) / l_m);
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 4e+293], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$m * N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[Power[N[(N[Power[x, -2.0], $MachinePrecision] + N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \cdot l_m \leq 4 \cdot 10^{+293}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{else}:\\
\;\;\;\;t_m \cdot \frac{\sqrt{2} \cdot {\left({x}^{-2} + \left(\frac{1}{x + -1} + \frac{1}{x}\right)\right)}^{-0.5}}{l_m}\\


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

    1. Initial program 41.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. Simplified41.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} \]
    3. Taylor expanded in t around inf 43.5%

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

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

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

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

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

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

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

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

    if 3.9999999999999997e293 < (*.f64 l l)

    1. Initial program 0.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. Simplified0.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} \]
    3. Taylor expanded in l around inf 6.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 80.5% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \cdot l_m \leq 4 \cdot 10^{+293}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;t_m \cdot \left(\frac{\sqrt{2}}{l_m} \cdot \sqrt{\frac{1}{\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{x} \cdot \frac{1}{x}\right)}}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= (* l_m l_m) 4e+293)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (*
     t_m
     (*
      (/ (sqrt 2.0) l_m)
      (sqrt
       (/
        1.0
        (+ (/ 1.0 (+ x -1.0)) (+ (/ 1.0 x) (* (/ 1.0 x) (/ 1.0 x)))))))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if ((l_m * l_m) <= 4e+293) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = t_m * ((sqrt(2.0) / l_m) * sqrt((1.0 / ((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / x) * (1.0 / x)))))));
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if ((l_m * l_m) <= 4d+293) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else
        tmp = t_m * ((sqrt(2.0d0) / l_m) * sqrt((1.0d0 / ((1.0d0 / (x + (-1.0d0))) + ((1.0d0 / x) + ((1.0d0 / x) * (1.0d0 / x)))))))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if ((l_m * l_m) <= 4e+293) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = t_m * ((Math.sqrt(2.0) / l_m) * Math.sqrt((1.0 / ((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / x) * (1.0 / x)))))));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if (l_m * l_m) <= 4e+293:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	else:
		tmp = t_m * ((math.sqrt(2.0) / l_m) * math.sqrt((1.0 / ((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / x) * (1.0 / x)))))))
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (Float64(l_m * l_m) <= 4e+293)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(t_m * Float64(Float64(sqrt(2.0) / l_m) * sqrt(Float64(1.0 / Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / x) * Float64(1.0 / x))))))));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if ((l_m * l_m) <= 4e+293)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	else
		tmp = t_m * ((sqrt(2.0) / l_m) * sqrt((1.0 / ((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / x) * (1.0 / x)))))));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 4e+293], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$m * N[(N[(N[Sqrt[2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \cdot l_m \leq 4 \cdot 10^{+293}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{else}:\\
\;\;\;\;t_m \cdot \left(\frac{\sqrt{2}}{l_m} \cdot \sqrt{\frac{1}{\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{x} \cdot \frac{1}{x}\right)}}\right)\\


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

    1. Initial program 41.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. Simplified41.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} \]
    3. Taylor expanded in t around inf 43.5%

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

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

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

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

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

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

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

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

    if 3.9999999999999997e293 < (*.f64 l l)

    1. Initial program 0.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. Simplified0.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} \]
    3. Taylor expanded in l around inf 6.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 79.4% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \leq 6.1 \cdot 10^{+150}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;l_m \leq 8.2 \cdot 10^{+230} \lor \neg \left(l_m \leq 4.9 \cdot 10^{+272}\right):\\ \;\;\;\;t_m \cdot \frac{\sqrt{2}}{l_m \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 6.1e+150)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (if (or (<= l_m 8.2e+230) (not (<= l_m 4.9e+272)))
      (* t_m (/ (sqrt 2.0) (* l_m (sqrt (+ (/ 1.0 (+ x -1.0)) (/ 1.0 x))))))
      (+ 1.0 (/ -1.0 x))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 6.1e+150) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else if ((l_m <= 8.2e+230) || !(l_m <= 4.9e+272)) {
		tmp = t_m * (sqrt(2.0) / (l_m * sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (l_m <= 6.1d+150) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if ((l_m <= 8.2d+230) .or. (.not. (l_m <= 4.9d+272))) then
        tmp = t_m * (sqrt(2.0d0) / (l_m * sqrt(((1.0d0 / (x + (-1.0d0))) + (1.0d0 / x)))))
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 6.1e+150) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if ((l_m <= 8.2e+230) || !(l_m <= 4.9e+272)) {
		tmp = t_m * (Math.sqrt(2.0) / (l_m * Math.sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if l_m <= 6.1e+150:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	elif (l_m <= 8.2e+230) or not (l_m <= 4.9e+272):
		tmp = t_m * (math.sqrt(2.0) / (l_m * math.sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))))
	else:
		tmp = 1.0 + (-1.0 / x)
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (l_m <= 6.1e+150)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	elseif ((l_m <= 8.2e+230) || !(l_m <= 4.9e+272))
		tmp = Float64(t_m * Float64(sqrt(2.0) / Float64(l_m * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(1.0 / x))))));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (l_m <= 6.1e+150)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	elseif ((l_m <= 8.2e+230) || ~((l_m <= 4.9e+272)))
		tmp = t_m * (sqrt(2.0) / (l_m * sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))));
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[l$95$m, 6.1e+150], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l$95$m, 8.2e+230], N[Not[LessEqual[l$95$m, 4.9e+272]], $MachinePrecision]], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l$95$m * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 6.1 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;l_m \leq 8.2 \cdot 10^{+230} \lor \neg \left(l_m \leq 4.9 \cdot 10^{+272}\right):\\
\;\;\;\;t_m \cdot \frac{\sqrt{2}}{l_m \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 6.10000000000000026e150

    1. Initial program 37.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. Simplified37.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} \]
    3. Taylor expanded in t around inf 40.9%

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

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

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

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

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

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

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

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

    if 6.10000000000000026e150 < l < 8.20000000000000026e230 or 4.9000000000000002e272 < l

    1. Initial program 0.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. Simplified0.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} \]
    3. Taylor expanded in l around inf 3.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{-1 + x} + \color{blue}{\frac{1}{x}}}} \cdot t \]

    if 8.20000000000000026e230 < l < 4.9000000000000002e272

    1. Initial program 0.0%

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

      \[\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} \]
    3. Taylor expanded in t around inf 50.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 6.1 \cdot 10^{+150}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;\ell \leq 8.2 \cdot 10^{+230} \lor \neg \left(\ell \leq 4.9 \cdot 10^{+272}\right):\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 7: 78.1% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \leq 1.95 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;l_m \leq 7.5 \cdot 10^{+230} \lor \neg \left(l_m \leq 4.9 \cdot 10^{+272}\right):\\ \;\;\;\;\frac{\sqrt{2} \cdot t_m}{l_m} \cdot \sqrt{x \cdot 0.5 - 0.25}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 1.95e+152)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (if (or (<= l_m 7.5e+230) (not (<= l_m 4.9e+272)))
      (* (/ (* (sqrt 2.0) t_m) l_m) (sqrt (- (* x 0.5) 0.25)))
      (+ 1.0 (/ -1.0 x))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 1.95e+152) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else if ((l_m <= 7.5e+230) || !(l_m <= 4.9e+272)) {
		tmp = ((sqrt(2.0) * t_m) / l_m) * sqrt(((x * 0.5) - 0.25));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (l_m <= 1.95d+152) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if ((l_m <= 7.5d+230) .or. (.not. (l_m <= 4.9d+272))) then
        tmp = ((sqrt(2.0d0) * t_m) / l_m) * sqrt(((x * 0.5d0) - 0.25d0))
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 1.95e+152) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if ((l_m <= 7.5e+230) || !(l_m <= 4.9e+272)) {
		tmp = ((Math.sqrt(2.0) * t_m) / l_m) * Math.sqrt(((x * 0.5) - 0.25));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if l_m <= 1.95e+152:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	elif (l_m <= 7.5e+230) or not (l_m <= 4.9e+272):
		tmp = ((math.sqrt(2.0) * t_m) / l_m) * math.sqrt(((x * 0.5) - 0.25))
	else:
		tmp = 1.0 + (-1.0 / x)
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (l_m <= 1.95e+152)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	elseif ((l_m <= 7.5e+230) || !(l_m <= 4.9e+272))
		tmp = Float64(Float64(Float64(sqrt(2.0) * t_m) / l_m) * sqrt(Float64(Float64(x * 0.5) - 0.25)));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (l_m <= 1.95e+152)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	elseif ((l_m <= 7.5e+230) || ~((l_m <= 4.9e+272)))
		tmp = ((sqrt(2.0) * t_m) / l_m) * sqrt(((x * 0.5) - 0.25));
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[l$95$m, 1.95e+152], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l$95$m, 7.5e+230], N[Not[LessEqual[l$95$m, 4.9e+272]], $MachinePrecision]], N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * N[Sqrt[N[(N[(x * 0.5), $MachinePrecision] - 0.25), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 1.95 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;l_m \leq 7.5 \cdot 10^{+230} \lor \neg \left(l_m \leq 4.9 \cdot 10^{+272}\right):\\
\;\;\;\;\frac{\sqrt{2} \cdot t_m}{l_m} \cdot \sqrt{x \cdot 0.5 - 0.25}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 1.95000000000000006e152

    1. Initial program 37.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. Simplified37.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} \]
    3. Taylor expanded in t around inf 40.9%

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

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

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

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

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

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

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

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

    if 1.95000000000000006e152 < l < 7.5000000000000004e230 or 4.9000000000000002e272 < l

    1. Initial program 0.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. Simplified0.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} \]
    3. Taylor expanded in l around inf 3.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{-1 + x} + \color{blue}{\frac{1}{x}}}} \cdot t \]
    7. Taylor expanded in l around 0 76.8%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{1}{x} + \frac{1}{x - 1}}}} \]
    8. Taylor expanded in x around inf 76.9%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\ell} \cdot \sqrt{\color{blue}{0.5 \cdot x - 0.25}} \]

    if 7.5000000000000004e230 < l < 4.9000000000000002e272

    1. Initial program 0.0%

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

      \[\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} \]
    3. Taylor expanded in t around inf 50.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.95 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+230} \lor \neg \left(\ell \leq 4.9 \cdot 10^{+272}\right):\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\ell} \cdot \sqrt{x \cdot 0.5 - 0.25}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 8: 78.0% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \leq 4 \cdot 10^{+148}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;l_m \leq 4.25 \cdot 10^{+229} \lor \neg \left(l_m \leq 4.9 \cdot 10^{+272}\right):\\ \;\;\;\;\frac{\sqrt{2} \cdot t_m}{l_m} \cdot \sqrt{x \cdot 0.5}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 4e+148)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (if (or (<= l_m 4.25e+229) (not (<= l_m 4.9e+272)))
      (* (/ (* (sqrt 2.0) t_m) l_m) (sqrt (* x 0.5)))
      (+ 1.0 (/ -1.0 x))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 4e+148) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else if ((l_m <= 4.25e+229) || !(l_m <= 4.9e+272)) {
		tmp = ((sqrt(2.0) * t_m) / l_m) * sqrt((x * 0.5));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (l_m <= 4d+148) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if ((l_m <= 4.25d+229) .or. (.not. (l_m <= 4.9d+272))) then
        tmp = ((sqrt(2.0d0) * t_m) / l_m) * sqrt((x * 0.5d0))
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 4e+148) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if ((l_m <= 4.25e+229) || !(l_m <= 4.9e+272)) {
		tmp = ((Math.sqrt(2.0) * t_m) / l_m) * Math.sqrt((x * 0.5));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if l_m <= 4e+148:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	elif (l_m <= 4.25e+229) or not (l_m <= 4.9e+272):
		tmp = ((math.sqrt(2.0) * t_m) / l_m) * math.sqrt((x * 0.5))
	else:
		tmp = 1.0 + (-1.0 / x)
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (l_m <= 4e+148)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	elseif ((l_m <= 4.25e+229) || !(l_m <= 4.9e+272))
		tmp = Float64(Float64(Float64(sqrt(2.0) * t_m) / l_m) * sqrt(Float64(x * 0.5)));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (l_m <= 4e+148)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	elseif ((l_m <= 4.25e+229) || ~((l_m <= 4.9e+272)))
		tmp = ((sqrt(2.0) * t_m) / l_m) * sqrt((x * 0.5));
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[l$95$m, 4e+148], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l$95$m, 4.25e+229], N[Not[LessEqual[l$95$m, 4.9e+272]], $MachinePrecision]], N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * N[Sqrt[N[(x * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 4 \cdot 10^{+148}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;l_m \leq 4.25 \cdot 10^{+229} \lor \neg \left(l_m \leq 4.9 \cdot 10^{+272}\right):\\
\;\;\;\;\frac{\sqrt{2} \cdot t_m}{l_m} \cdot \sqrt{x \cdot 0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 4.0000000000000002e148

    1. Initial program 37.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. Simplified37.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} \]
    3. Taylor expanded in t around inf 40.9%

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

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

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

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

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

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

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

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

    if 4.0000000000000002e148 < l < 4.24999999999999983e229 or 4.9000000000000002e272 < l

    1. Initial program 0.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. Simplified0.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} \]
    3. Taylor expanded in l around inf 3.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{-1 + x} + \color{blue}{\frac{1}{x}}}} \cdot t \]
    7. Taylor expanded in l around 0 76.8%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{1}{x} + \frac{1}{x - 1}}}} \]
    8. Taylor expanded in x around inf 76.8%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\ell} \cdot \sqrt{\color{blue}{0.5 \cdot x}} \]
    9. Step-by-step derivation
      1. *-commutative76.8%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\ell} \cdot \sqrt{\color{blue}{x \cdot 0.5}} \]
    10. Simplified76.8%

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

    if 4.24999999999999983e229 < l < 4.9000000000000002e272

    1. Initial program 0.0%

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

      \[\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} \]
    3. Taylor expanded in t around inf 50.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 4 \cdot 10^{+148}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;\ell \leq 4.25 \cdot 10^{+229} \lor \neg \left(\ell \leq 4.9 \cdot 10^{+272}\right):\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\ell} \cdot \sqrt{x \cdot 0.5}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 9: 78.1% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \leq 8.4 \cdot 10^{+151}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;l_m \leq 4.8 \cdot 10^{+230} \lor \neg \left(l_m \leq 4.9 \cdot 10^{+272}\right):\\ \;\;\;\;\frac{t_m \cdot \frac{\sqrt{2}}{l_m}}{\sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 8.4e+151)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (if (or (<= l_m 4.8e+230) (not (<= l_m 4.9e+272)))
      (/ (* t_m (/ (sqrt 2.0) l_m)) (sqrt (/ 2.0 x)))
      (+ 1.0 (/ -1.0 x))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 8.4e+151) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else if ((l_m <= 4.8e+230) || !(l_m <= 4.9e+272)) {
		tmp = (t_m * (sqrt(2.0) / l_m)) / sqrt((2.0 / x));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (l_m <= 8.4d+151) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if ((l_m <= 4.8d+230) .or. (.not. (l_m <= 4.9d+272))) then
        tmp = (t_m * (sqrt(2.0d0) / l_m)) / sqrt((2.0d0 / x))
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 8.4e+151) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if ((l_m <= 4.8e+230) || !(l_m <= 4.9e+272)) {
		tmp = (t_m * (Math.sqrt(2.0) / l_m)) / Math.sqrt((2.0 / x));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if l_m <= 8.4e+151:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	elif (l_m <= 4.8e+230) or not (l_m <= 4.9e+272):
		tmp = (t_m * (math.sqrt(2.0) / l_m)) / math.sqrt((2.0 / x))
	else:
		tmp = 1.0 + (-1.0 / x)
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (l_m <= 8.4e+151)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	elseif ((l_m <= 4.8e+230) || !(l_m <= 4.9e+272))
		tmp = Float64(Float64(t_m * Float64(sqrt(2.0) / l_m)) / sqrt(Float64(2.0 / x)));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (l_m <= 8.4e+151)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	elseif ((l_m <= 4.8e+230) || ~((l_m <= 4.9e+272)))
		tmp = (t_m * (sqrt(2.0) / l_m)) / sqrt((2.0 / x));
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[l$95$m, 8.4e+151], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l$95$m, 4.8e+230], N[Not[LessEqual[l$95$m, 4.9e+272]], $MachinePrecision]], N[(N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 8.4 \cdot 10^{+151}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;l_m \leq 4.8 \cdot 10^{+230} \lor \neg \left(l_m \leq 4.9 \cdot 10^{+272}\right):\\
\;\;\;\;\frac{t_m \cdot \frac{\sqrt{2}}{l_m}}{\sqrt{\frac{2}{x}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 8.4000000000000002e151

    1. Initial program 37.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. Simplified37.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} \]
    3. Taylor expanded in t around inf 40.9%

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

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

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

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

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

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

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

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

    if 8.4000000000000002e151 < l < 4.79999999999999996e230 or 4.9000000000000002e272 < l

    1. Initial program 0.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. Simplified0.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} \]
    3. Taylor expanded in l around inf 3.0%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\ell \cdot \sqrt{\frac{1}{-1 + x} + \left(\frac{x}{-1 + x} - 1\right)}}} \cdot t \]
    6. Step-by-step derivation
      1. *-un-lft-identity40.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.79999999999999996e230 < l < 4.9000000000000002e272

    1. Initial program 0.0%

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

      \[\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} \]
    3. Taylor expanded in t around inf 50.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 8.4 \cdot 10^{+151}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+230} \lor \neg \left(\ell \leq 4.9 \cdot 10^{+272}\right):\\ \;\;\;\;\frac{t \cdot \frac{\sqrt{2}}{\ell}}{\sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 10: 77.2% accurate, 1.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 3.15 \cdot 10^{-255}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t_m}{l_m} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.15e-255)
    (* (/ (* (sqrt 2.0) t_m) l_m) (sqrt x))
    (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 3.15e-255) {
		tmp = ((sqrt(2.0) * t_m) / l_m) * sqrt(x);
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (t_m <= 3.15d-255) then
        tmp = ((sqrt(2.0d0) * t_m) / l_m) * sqrt(x)
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 3.15e-255) {
		tmp = ((Math.sqrt(2.0) * t_m) / l_m) * Math.sqrt(x);
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if t_m <= 3.15e-255:
		tmp = ((math.sqrt(2.0) * t_m) / l_m) * math.sqrt(x)
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (t_m <= 3.15e-255)
		tmp = Float64(Float64(Float64(sqrt(2.0) * t_m) / l_m) * sqrt(x));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (t_m <= 3.15e-255)
		tmp = ((sqrt(2.0) * t_m) / l_m) * sqrt(x);
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 3.15e-255], N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 3.15 \cdot 10^{-255}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t_m}{l_m} \cdot \sqrt{x}\\

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


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

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

      \[\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} \]
    3. Taylor expanded in l around inf 2.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{-1 + x} + \color{blue}{\frac{1}{x}}}} \cdot t \]
    7. Taylor expanded in l around 0 20.4%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{1}{x} + \frac{1}{x - 1}}}} \]
    8. Taylor expanded in x around 0 11.5%

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

    if 3.15e-255 < t

    1. Initial program 35.2%

      \[\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. Simplified35.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} \]
    3. Taylor expanded in t around inf 79.8%

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

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

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

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

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

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

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

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

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

Alternative 11: 76.9% accurate, 2.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 4.7 \cdot 10^{-254}:\\ \;\;\;\;x \cdot \frac{t_m}{\frac{l_m}{\sqrt{2}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.7e-254)
    (* x (/ t_m (/ l_m (sqrt 2.0))))
    (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 4.7e-254) {
		tmp = x * (t_m / (l_m / sqrt(2.0)));
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (t_m <= 4.7d-254) then
        tmp = x * (t_m / (l_m / sqrt(2.0d0)))
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 4.7e-254) {
		tmp = x * (t_m / (l_m / Math.sqrt(2.0)));
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if t_m <= 4.7e-254:
		tmp = x * (t_m / (l_m / math.sqrt(2.0)))
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (t_m <= 4.7e-254)
		tmp = Float64(x * Float64(t_m / Float64(l_m / sqrt(2.0))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (t_m <= 4.7e-254)
		tmp = x * (t_m / (l_m / sqrt(2.0)));
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 4.7e-254], N[(x * N[(t$95$m / N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4.7 \cdot 10^{-254}:\\
\;\;\;\;x \cdot \frac{t_m}{\frac{l_m}{\sqrt{2}}}\\

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


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

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

      \[\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} \]
    3. Taylor expanded in l around inf 2.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{\ell}{t \cdot \sqrt{2}}}} \]
      2. div-inv10.6%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{\ell}{t \cdot \sqrt{2}}}} \]
      3. clear-num10.6%

        \[\leadsto x \cdot \color{blue}{\frac{t \cdot \sqrt{2}}{\ell}} \]
      4. associate-/l*10.6%

        \[\leadsto x \cdot \color{blue}{\frac{t}{\frac{\ell}{\sqrt{2}}}} \]
    11. Applied egg-rr10.6%

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

    if 4.70000000000000027e-254 < t

    1. Initial program 35.2%

      \[\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. Simplified35.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} \]
    3. Taylor expanded in t around inf 79.8%

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

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

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

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

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

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

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

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

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

Alternative 12: 76.9% accurate, 2.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \sqrt{\frac{x + -1}{x + 1}} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (* t_s (sqrt (/ (+ x -1.0) (+ x 1.0)))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	return t_s * sqrt(((x + -1.0) / (x + 1.0)));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    code = t_s * sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	return t_s * Math.sqrt(((x + -1.0) / (x + 1.0)));
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	return t_s * math.sqrt(((x + -1.0) / (x + 1.0)))
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	return Float64(t_s * sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))))
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l_m, t_m)
	tmp = t_s * sqrt(((x + -1.0) / (x + 1.0)));
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \sqrt{\frac{x + -1}{x + 1}}
\end{array}
Derivation
  1. Initial program 33.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. Simplified33.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} \]
  3. Taylor expanded in t around inf 38.4%

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

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

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

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

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

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

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

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

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

Alternative 13: 76.3% accurate, 45.0× speedup?

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

\\
t_s \cdot \left(1 + \frac{-1}{x}\right)
\end{array}
Derivation
  1. Initial program 33.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. Simplified33.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} \]
  3. Taylor expanded in t around inf 38.4%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  7. Final simplification38.3%

    \[\leadsto 1 + \frac{-1}{x} \]

Alternative 14: 75.6% accurate, 225.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot 1 \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m) :precision binary64 (* t_s 1.0))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	return t_s * 1.0;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    code = t_s * 1.0d0
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	return t_s * 1.0;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	return t_s * 1.0
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	return Float64(t_s * 1.0)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l_m, t_m)
	tmp = t_s * 1.0;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * 1.0), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot 1
\end{array}
Derivation
  1. Initial program 33.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. Simplified33.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} \]
  3. Taylor expanded in t around inf 38.4%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1} \]
  7. Final simplification37.9%

    \[\leadsto 1 \]

Reproduce

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