Toniolo and Linder, Equation (7)

Percentage Accurate: 33.6% → 85.6%
Time: 21.3s
Alternatives: 11
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 11 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.6% 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: 85.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\ell}{\frac{x}{\ell}}\\ \mathbf{if}\;t \leq -9.5 \cdot 10^{+150}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+38}:\\ \;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t \cdot \sqrt{\frac{2}{t_1 + \mathsf{fma}\left(2, t \cdot \frac{t}{x}, \mathsf{fma}\left(2, t \cdot t, t_1\right)\right)}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ l (/ x l))))
   (if (<= t -9.5e+150)
     (+ (/ 1.0 x) -1.0)
     (if (<= t 1.7e+38)
       (log1p
        (expm1
         (*
          t
          (sqrt
           (/ 2.0 (+ t_1 (fma 2.0 (* t (/ t x)) (fma 2.0 (* t t) t_1))))))))
       (sqrt (/ (+ x -1.0) (+ 1.0 x)))))))
double code(double x, double l, double t) {
	double t_1 = l / (x / l);
	double tmp;
	if (t <= -9.5e+150) {
		tmp = (1.0 / x) + -1.0;
	} else if (t <= 1.7e+38) {
		tmp = log1p(expm1((t * sqrt((2.0 / (t_1 + fma(2.0, (t * (t / x)), fma(2.0, (t * t), t_1))))))));
	} else {
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	}
	return tmp;
}
function code(x, l, t)
	t_1 = Float64(l / Float64(x / l))
	tmp = 0.0
	if (t <= -9.5e+150)
		tmp = Float64(Float64(1.0 / x) + -1.0);
	elseif (t <= 1.7e+38)
		tmp = log1p(expm1(Float64(t * sqrt(Float64(2.0 / Float64(t_1 + fma(2.0, Float64(t * Float64(t / x)), fma(2.0, Float64(t * t), t_1))))))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)));
	end
	return tmp
end
code[x_, l_, t_] := Block[{t$95$1 = N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e+150], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 1.7e+38], N[Log[1 + N[(Exp[N[(t * N[Sqrt[N[(2.0 / N[(t$95$1 + N[(2.0 * N[(t * N[(t / x), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\ell}{\frac{x}{\ell}}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{+150}:\\
\;\;\;\;\frac{1}{x} + -1\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t \cdot \sqrt{\frac{2}{t_1 + \mathsf{fma}\left(2, t \cdot \frac{t}{x}, \mathsf{fma}\left(2, t \cdot t, t_1\right)\right)}}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.5000000000000001e150

    1. Initial program 8.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    8. Taylor expanded in x around -inf 0.0%

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

        \[\leadsto \frac{1}{x} + \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt96.0%

        \[\leadsto \frac{1}{x} + \color{blue}{-1} \]
    10. Simplified96.0%

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

    if -9.5000000000000001e150 < t < 1.69999999999999998e38

    1. Initial program 46.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. Step-by-step derivation
      1. associate-*l/46.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg80.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.69999999999999998e38 < t

    1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+150}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+38}:\\ \;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t \cdot \sqrt{\frac{2}{\frac{\ell}{\frac{x}{\ell}} + \mathsf{fma}\left(2, t \cdot \frac{t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell}{\frac{x}{\ell}}\right)\right)}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 2: 85.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+100}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{\mathsf{fma}\left(\frac{\ell}{x}, \ell, 2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -3.4e+100)
   (+ (/ 1.0 x) -1.0)
   (if (<= t 1.7e+38)
     (*
      t
      (sqrt
       (/ 2.0 (fma (/ l x) l (+ (* 2.0 (* t (+ t (/ t x)))) (* l (/ l x)))))))
     (sqrt (/ (+ x -1.0) (+ 1.0 x))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -3.4e+100) {
		tmp = (1.0 / x) + -1.0;
	} else if (t <= 1.7e+38) {
		tmp = t * sqrt((2.0 / fma((l / x), l, ((2.0 * (t * (t + (t / x)))) + (l * (l / x))))));
	} else {
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	}
	return tmp;
}
function code(x, l, t)
	tmp = 0.0
	if (t <= -3.4e+100)
		tmp = Float64(Float64(1.0 / x) + -1.0);
	elseif (t <= 1.7e+38)
		tmp = Float64(t * sqrt(Float64(2.0 / fma(Float64(l / x), l, Float64(Float64(2.0 * Float64(t * Float64(t + Float64(t / x)))) + Float64(l * Float64(l / x)))))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)));
	end
	return tmp
end
code[x_, l_, t_] := If[LessEqual[t, -3.4e+100], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 1.7e+38], N[(t * N[Sqrt[N[(2.0 / N[(N[(l / x), $MachinePrecision] * l + N[(N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+100}:\\
\;\;\;\;\frac{1}{x} + -1\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+38}:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{\mathsf{fma}\left(\frac{\ell}{x}, \ell, 2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + \ell \cdot \frac{\ell}{x}\right)}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.39999999999999994e100

    1. Initial program 27.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. Step-by-step derivation
      1. associate-*l/27.0%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified27.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} \]
    4. Taylor expanded in t around inf 3.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    8. Taylor expanded in x around -inf 0.0%

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

        \[\leadsto \frac{1}{x} + \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt96.8%

        \[\leadsto \frac{1}{x} + \color{blue}{-1} \]
    10. Simplified96.8%

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

    if -3.39999999999999994e100 < t < 1.69999999999999998e38

    1. Initial program 41.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. Step-by-step derivation
      1. associate-*l/41.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.69999999999999998e38 < t

    1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+100}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{\mathsf{fma}\left(\frac{\ell}{x}, \ell, 2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 3: 77.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-189}:\\
\;\;\;\;\frac{1}{x} + -1\\

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-175}:\\
\;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{1}{x} + \frac{1}{x + -1}}} \cdot \frac{\sqrt{2}}{\ell}\right)\\

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


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

    1. Initial program 41.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. Step-by-step derivation
      1. associate-*l/41.0%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified41.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} \]
    4. Taylor expanded in t around inf 31.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    8. Taylor expanded in x around -inf 0.0%

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

        \[\leadsto \frac{1}{x} + \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt84.4%

        \[\leadsto \frac{1}{x} + \color{blue}{-1} \]
    10. Simplified84.4%

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

    if -4.9999999999999997e-189 < t < 2.3e-175

    1. Initial program 2.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. Step-by-step derivation
      1. associate-*l/2.0%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified2.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} \]
    4. 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 \]
    5. 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+25.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-neg25.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-eval25.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. +-commutative25.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-neg25.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-eval25.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. +-commutative25.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 \]
    6. Simplified25.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 \]
    7. Taylor expanded in x around inf 55.6%

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

    if 2.3e-175 < t

    1. Initial program 37.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.2% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-t_1\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 36.9%

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

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified37.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} \]
    4. Taylor expanded in t around inf 28.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 32.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. Step-by-step derivation
      1. associate-*l/32.2%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.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} \]
    4. Taylor expanded in t around inf 29.6%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 76.9% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\

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


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

    1. Initial program 36.9%

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

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified37.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} \]
    4. Taylor expanded in t around inf 28.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-\sqrt{\frac{x + -1}{1 + x}}} \]
    10. Taylor expanded in x around inf 77.9%

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

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

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

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

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

      \[\leadsto -\color{blue}{\left(1 + \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\right)} \]

    if -4.999999999999985e-310 < t

    1. Initial program 32.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. Step-by-step derivation
      1. associate-*l/32.2%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.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} \]
    4. Taylor expanded in t around inf 29.6%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 76.7% accurate, 17.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + -1\\

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


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

    1. Initial program 36.9%

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

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified37.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} \]
    4. Taylor expanded in t around inf 28.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    8. Taylor expanded in x around -inf 0.0%

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

        \[\leadsto \frac{1}{x} + \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt77.8%

        \[\leadsto \frac{1}{x} + \color{blue}{-1} \]
    10. Simplified77.8%

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

    if -4.999999999999985e-310 < t

    1. Initial program 32.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. Step-by-step derivation
      1. associate-*l/32.2%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.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} \]
    4. Taylor expanded in t around inf 29.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{0.5}{x}}{x}} + \left(1 + \left(-\frac{1}{x}\right)\right) \]
      8. distribute-neg-frac74.1%

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

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

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

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

Alternative 7: 76.8% accurate, 17.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\

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


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

    1. Initial program 36.9%

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

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified37.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} \]
    4. Taylor expanded in t around inf 28.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-\sqrt{\frac{x + -1}{1 + x}}} \]
    10. Taylor expanded in x around inf 77.9%

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

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

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

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

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

      \[\leadsto -\color{blue}{\left(1 + \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\right)} \]

    if -4.999999999999985e-310 < t

    1. Initial program 32.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. Step-by-step derivation
      1. associate-*l/32.2%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.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} \]
    4. Taylor expanded in t around inf 29.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{0.5}{x}}{x}} + \left(1 + \left(-\frac{1}{x}\right)\right) \]
      8. distribute-neg-frac74.1%

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

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

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

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

Alternative 8: 75.8% accurate, 31.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-309}:\\
\;\;\;\;t \cdot \frac{-1}{t}\\

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


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

    1. Initial program 36.9%

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

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified37.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} \]
    4. Taylor expanded in x around inf 40.2%

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

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

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

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

    if -5.5e-309 < t

    1. Initial program 32.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. Step-by-step derivation
      1. associate-*l/32.2%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.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} \]
    4. Taylor expanded in t around inf 29.6%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.2% accurate, 31.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + -1\\

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


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

    1. Initial program 36.9%

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

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified37.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} \]
    4. Taylor expanded in t around inf 28.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    8. Taylor expanded in x around -inf 0.0%

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

        \[\leadsto \frac{1}{x} + \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt77.8%

        \[\leadsto \frac{1}{x} + \color{blue}{-1} \]
    10. Simplified77.8%

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

    if -4.999999999999985e-310 < t

    1. Initial program 32.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. Step-by-step derivation
      1. associate-*l/32.2%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.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} \]
    4. Taylor expanded in t around inf 29.6%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 76.6% accurate, 31.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + -1\\

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


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

    1. Initial program 36.9%

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

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified37.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} \]
    4. Taylor expanded in t around inf 28.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    8. Taylor expanded in x around -inf 0.0%

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

        \[\leadsto \frac{1}{x} + \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt77.8%

        \[\leadsto \frac{1}{x} + \color{blue}{-1} \]
    10. Simplified77.8%

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

    if -4.999999999999985e-310 < t

    1. Initial program 32.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. Step-by-step derivation
      1. associate-*l/32.2%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified32.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} \]
    4. Taylor expanded in t around inf 29.6%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 38.0% accurate, 225.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 1 \]

Reproduce

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