Toniolo and Linder, Equation (7)

Percentage Accurate: 33.9% → 81.0%
Time: 32.7s
Alternatives: 15
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 15 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.9% 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: 81.0% accurate, 0.3× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\ \mathbf{if}\;t \leq -1.4 \cdot 10^{-141}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 10^{-222}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{x \cdot x} + \frac{1}{{x}^{3}}\right)\right)}}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-125} \lor \neg \left(t \leq 5.9 \cdot 10^{+35}\right):\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot t_1}{x \cdot x}\right) + \frac{t_1}{x}}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (fma 2.0 (* t t) (* l l))))
   (if (<= t -1.4e-141)
     (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
     (if (<= t 1e-222)
       (*
        t
        (/
         (sqrt 2.0)
         (*
          l
          (sqrt
           (+
            (/ 1.0 (+ x -1.0))
            (+ (/ 1.0 x) (+ (/ 1.0 (* x x)) (/ 1.0 (pow x 3.0)))))))))
       (if (or (<= t 3.4e-125) (not (<= t 5.9e+35)))
         (*
          t
          (/ (sqrt 2.0) (* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0))))))
         (*
          t
          (/
           (sqrt 2.0)
           (sqrt
            (+
             (+
              (fma 2.0 (/ (* t t) x) (fma 2.0 (* t t) (/ (* l l) x)))
              (/ (* 2.0 t_1) (* x x)))
             (/ t_1 x))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = fma(2.0, (t * t), (l * l));
	double tmp;
	if (t <= -1.4e-141) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1e-222) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / pow(x, 3.0))))))));
	} else if ((t <= 3.4e-125) || !(t <= 5.9e+35)) {
		tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
	} else {
		tmp = t * (sqrt(2.0) / sqrt(((fma(2.0, ((t * t) / x), fma(2.0, (t * t), ((l * l) / x))) + ((2.0 * t_1) / (x * x))) + (t_1 / x))));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = fma(2.0, Float64(t * t), Float64(l * l))
	tmp = 0.0
	if (t <= -1.4e-141)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 1e-222)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / Float64(x * x)) + Float64(1.0 / (x ^ 3.0)))))))));
	elseif ((t <= 3.4e-125) || !(t <= 5.9e+35))
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	else
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(fma(2.0, Float64(Float64(t * t) / x), fma(2.0, Float64(t * t), Float64(Float64(l * l) / x))) + Float64(Float64(2.0 * t_1) / Float64(x * x))) + Float64(t_1 / x)))));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e-141], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1e-222], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 3.4e-125], N[Not[LessEqual[t, 5.9e+35]], $MachinePrecision]], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * t$95$1), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{-141}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

\mathbf{elif}\;t \leq 3.4 \cdot 10^{-125} \lor \neg \left(t \leq 5.9 \cdot 10^{+35}\right):\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot t_1}{x \cdot x}\right) + \frac{t_1}{x}}}\\


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

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/49.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. Simplified49.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 t around -inf 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.40000000000000006e-141 < t < 1.00000000000000005e-222

    1. Initial program 4.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/4.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. Simplified4.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 l around inf 3.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000005e-222 < t < 3.39999999999999975e-125 or 5.89999999999999985e35 < t

    1. Initial program 26.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/26.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. Simplified26.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 86.6%

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

    if 3.39999999999999975e-125 < t < 5.89999999999999985e35

    1. Initial program 65.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/65.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. Simplified65.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 x around -inf 85.6%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x \cdot x}\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}} \cdot t \]
  3. Recombined 4 regimes into one program.
  4. Final simplification83.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-141}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 10^{-222}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{x \cdot x} + \frac{1}{{x}^{3}}\right)\right)}}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-125} \lor \neg \left(t \leq 5.9 \cdot 10^{+35}\right):\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x \cdot x}\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}\\ \end{array} \]

Alternative 2: 80.9% accurate, 0.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{-137}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{x \cdot x} + \frac{1}{{x}^{3}}\right)\right)}}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-125} \lor \neg \left(t \leq 1.3 \cdot 10^{+36}\right):\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}{2}}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.55e-137)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 1.65e-223)
     (*
      t
      (/
       (sqrt 2.0)
       (*
        l
        (sqrt
         (+
          (/ 1.0 (+ x -1.0))
          (+ (/ 1.0 x) (+ (/ 1.0 (* x x)) (/ 1.0 (pow x 3.0)))))))))
     (if (or (<= t 3.4e-125) (not (<= t 1.3e+36)))
       (*
        t
        (/ (sqrt 2.0) (* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0))))))
       (/
        t
        (sqrt
         (/
          (+
           (fma 2.0 (/ (* t t) x) (fma 2.0 (* t t) (/ (* l l) x)))
           (/ (fma l l (* 2.0 (* t t))) x))
          2.0)))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.55e-137) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.65e-223) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / pow(x, 3.0))))))));
	} else if ((t <= 3.4e-125) || !(t <= 1.3e+36)) {
		tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
	} else {
		tmp = t / sqrt(((fma(2.0, ((t * t) / x), fma(2.0, (t * t), ((l * l) / x))) + (fma(l, l, (2.0 * (t * t))) / x)) / 2.0));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.55e-137)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 1.65e-223)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / Float64(x * x)) + Float64(1.0 / (x ^ 3.0)))))))));
	elseif ((t <= 3.4e-125) || !(t <= 1.3e+36))
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	else
		tmp = Float64(t / sqrt(Float64(Float64(fma(2.0, Float64(Float64(t * t) / x), fma(2.0, Float64(t * t), Float64(Float64(l * l) / x))) + Float64(fma(l, l, Float64(2.0 * Float64(t * t))) / x)) / 2.0)));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1.55e-137], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.65e-223], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 3.4e-125], N[Not[LessEqual[t, 1.3e+36]], $MachinePrecision]], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[Sqrt[N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{-137}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

\mathbf{elif}\;t \leq 3.4 \cdot 10^{-125} \lor \neg \left(t \leq 1.3 \cdot 10^{+36}\right):\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}{2}}}\\


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

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/49.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. Simplified49.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 t around -inf 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.54999999999999989e-137 < t < 1.64999999999999997e-223

    1. Initial program 4.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/4.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. Simplified4.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 l around inf 3.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999997e-223 < t < 3.39999999999999975e-125 or 1.3000000000000001e36 < t

    1. Initial program 26.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/26.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. Simplified26.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 86.6%

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

    if 3.39999999999999975e-125 < t < 1.3000000000000001e36

    1. Initial program 65.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/65.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. Simplified65.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. Step-by-step derivation
      1. *-commutative65.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{-137}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{x \cdot x} + \frac{1}{{x}^{3}}\right)\right)}}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-125} \lor \neg \left(t \leq 1.3 \cdot 10^{+36}\right):\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}{2}}}\\ \end{array} \]

Alternative 3: 79.5% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{-141}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-222}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{x \cdot x} + \frac{1}{{x}^{3}}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -2.6e-141)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 1.6e-222)
     (*
      t
      (/
       (sqrt 2.0)
       (*
        l
        (sqrt
         (+
          (/ 1.0 (+ x -1.0))
          (+ (/ 1.0 x) (+ (/ 1.0 (* x x)) (/ 1.0 (pow x 3.0)))))))))
     (*
      t
      (/ (sqrt 2.0) (* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2.6e-141) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.6e-222) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / pow(x, 3.0))))))));
	} else {
		tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-2.6d-141)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 1.6d-222) then
        tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / (x + (-1.0d0))) + ((1.0d0 / x) + ((1.0d0 / (x * x)) + (1.0d0 / (x ** 3.0d0))))))))
    else
        tmp = t * (sqrt(2.0d0) / ((t * sqrt(2.0d0)) * sqrt(((x + 1.0d0) / (x + (-1.0d0))))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -2.6e-141) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.6e-222) {
		tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / Math.pow(x, 3.0))))))));
	} else {
		tmp = t * (Math.sqrt(2.0) / ((t * Math.sqrt(2.0)) * Math.sqrt(((x + 1.0) / (x + -1.0)))));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -2.6e-141:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 1.6e-222:
		tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / math.pow(x, 3.0))))))))
	else:
		tmp = t * (math.sqrt(2.0) / ((t * math.sqrt(2.0)) * math.sqrt(((x + 1.0) / (x + -1.0)))))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -2.6e-141)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 1.6e-222)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / Float64(x * x)) + Float64(1.0 / (x ^ 3.0)))))))));
	else
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -2.6e-141)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 1.6e-222)
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / (x ^ 3.0))))))));
	else
		tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -2.6e-141], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.6e-222], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-141}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

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


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

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/49.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. Simplified49.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 t around -inf 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.60000000000000011e-141 < t < 1.6e-222

    1. Initial program 4.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/4.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. Simplified4.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 l around inf 3.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e-222 < t

    1. Initial program 36.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/36.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. Simplified36.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 82.6%

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

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

Alternative 4: 79.3% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -5.4 \cdot 10^{-138}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-222}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(t_1 \cdot \frac{\sqrt{0.5}}{\frac{t}{\sqrt{2}}}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -5.4e-138)
     (- t_1)
     (if (<= t 2.1e-222)
       (*
        t
        (/
         (sqrt 2.0)
         (* l (sqrt (+ (/ 1.0 (+ x -1.0)) (+ (/ 1.0 x) (/ 1.0 (* x x))))))))
       (* t (* t_1 (/ (sqrt 0.5) (/ t (sqrt 2.0)))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -5.4e-138) {
		tmp = -t_1;
	} else if (t <= 2.1e-222) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
	} else {
		tmp = t * (t_1 * (sqrt(0.5) / (t / sqrt(2.0))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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)) / (x + 1.0d0)))
    if (t <= (-5.4d-138)) then
        tmp = -t_1
    else if (t <= 2.1d-222) then
        tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / (x + (-1.0d0))) + ((1.0d0 / x) + (1.0d0 / (x * x)))))))
    else
        tmp = t * (t_1 * (sqrt(0.5d0) / (t / sqrt(2.0d0))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -5.4e-138) {
		tmp = -t_1;
	} else if (t <= 2.1e-222) {
		tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
	} else {
		tmp = t * (t_1 * (Math.sqrt(0.5) / (t / Math.sqrt(2.0))));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -5.4e-138:
		tmp = -t_1
	elif t <= 2.1e-222:
		tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))))
	else:
		tmp = t * (t_1 * (math.sqrt(0.5) / (t / math.sqrt(2.0))))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -5.4e-138)
		tmp = Float64(-t_1);
	elseif (t <= 2.1e-222)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x))))))));
	else
		tmp = Float64(t * Float64(t_1 * Float64(sqrt(0.5) / Float64(t / sqrt(2.0)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -5.4e-138)
		tmp = -t_1;
	elseif (t <= 2.1e-222)
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
	else
		tmp = t * (t_1 * (sqrt(0.5) / (t / sqrt(2.0))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -5.4e-138], (-t$95$1), If[LessEqual[t, 2.1e-222], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(t$95$1 * N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{-138}:\\
\;\;\;\;-t_1\\

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

\mathbf{else}:\\
\;\;\;\;t \cdot \left(t_1 \cdot \frac{\sqrt{0.5}}{\frac{t}{\sqrt{2}}}\right)\\


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

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/49.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. Simplified49.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 t around -inf 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.40000000000000057e-138 < t < 2.0999999999999999e-222

    1. Initial program 4.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/4.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. Simplified4.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 l around inf 3.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0999999999999999e-222 < t

    1. Initial program 36.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/36.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. Simplified36.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 81.7%

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

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

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

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

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

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

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

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

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

Alternative 5: 79.5% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{-140}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-222}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.35e-140)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 1.25e-222)
     (*
      t
      (/
       (sqrt 2.0)
       (* l (sqrt (+ (/ 1.0 (+ x -1.0)) (+ (/ 1.0 x) (/ 1.0 (* x x))))))))
     (*
      t
      (/ (sqrt 2.0) (* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.35e-140) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.25e-222) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
	} else {
		tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-1.35d-140)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 1.25d-222) then
        tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / (x + (-1.0d0))) + ((1.0d0 / x) + (1.0d0 / (x * x)))))))
    else
        tmp = t * (sqrt(2.0d0) / ((t * sqrt(2.0d0)) * sqrt(((x + 1.0d0) / (x + (-1.0d0))))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.35e-140) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.25e-222) {
		tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
	} else {
		tmp = t * (Math.sqrt(2.0) / ((t * Math.sqrt(2.0)) * Math.sqrt(((x + 1.0) / (x + -1.0)))));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1.35e-140:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 1.25e-222:
		tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))))
	else:
		tmp = t * (math.sqrt(2.0) / ((t * math.sqrt(2.0)) * math.sqrt(((x + 1.0) / (x + -1.0)))))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.35e-140)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 1.25e-222)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x))))))));
	else
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.35e-140)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 1.25e-222)
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
	else
		tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1.35e-140], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.25e-222], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-140}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

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


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

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/49.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. Simplified49.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 t around -inf 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35e-140 < t < 1.25000000000000002e-222

    1. Initial program 4.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/4.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. Simplified4.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 l around inf 3.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25000000000000002e-222 < t

    1. Initial program 36.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/36.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. Simplified36.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 82.6%

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

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

Alternative 6: 79.3% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{-140}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-224}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.55e-140)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 4e-224)
     (*
      t
      (/
       (sqrt 2.0)
       (* l (sqrt (+ (/ 1.0 (+ x -1.0)) (+ (/ 1.0 x) (/ 1.0 (* x x))))))))
     (+ 1.0 (/ -0.5 (* x 0.5))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.55e-140) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 4e-224) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-1.55d-140)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 4d-224) then
        tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / (x + (-1.0d0))) + ((1.0d0 / x) + (1.0d0 / (x * x)))))))
    else
        tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.55e-140) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 4e-224) {
		tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1.55e-140:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 4e-224:
		tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))))
	else:
		tmp = 1.0 + (-0.5 / (x * 0.5))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.55e-140)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 4e-224)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x))))))));
	else
		tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.55e-140)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 4e-224)
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
	else
		tmp = 1.0 + (-0.5 / (x * 0.5));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1.55e-140], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 4e-224], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{-140}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

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


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

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/49.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. Simplified49.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 t around -inf 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55e-140 < t < 4.0000000000000001e-224

    1. Initial program 4.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/4.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. Simplified4.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 l around inf 3.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.0000000000000001e-224 < t

    1. Initial program 36.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/36.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. Simplified36.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. Step-by-step derivation
      1. *-commutative36.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\left(t \cdot \sqrt{0.5}\right) \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \]
    12. Taylor expanded in x around inf 81.7%

      \[\leadsto \color{blue}{1 - 0.5 \cdot \frac{1}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}} \]
    13. Step-by-step derivation
      1. sub-neg81.7%

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

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

        \[\leadsto 1 + \left(-\frac{\color{blue}{0.5}}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}\right) \]
      4. distribute-neg-frac81.7%

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

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

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

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{\left(\sqrt{0.5} \cdot \sqrt{0.5}\right)} \cdot x} \]
      8. rem-square-sqrt81.7%

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{0.5} \cdot x} \]
    14. Simplified81.7%

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

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

Alternative 7: 79.3% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{-139}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-222}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -3e-139)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 1.75e-222)
     (* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 1.0 (+ x -1.0)) (/ 1.0 x))))))
     (+ 1.0 (/ -0.5 (* x 0.5))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -3e-139) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.75e-222) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))));
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-3d-139)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 1.75d-222) then
        tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / (x + (-1.0d0))) + (1.0d0 / x)))))
    else
        tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -3e-139) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.75e-222) {
		tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))));
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -3e-139:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 1.75e-222:
		tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))))
	else:
		tmp = 1.0 + (-0.5 / (x * 0.5))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -3e-139)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 1.75e-222)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(1.0 / x))))));
	else
		tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -3e-139)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 1.75e-222)
		tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))));
	else
		tmp = 1.0 + (-0.5 / (x * 0.5));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -3e-139], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.75e-222], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-139}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;t \leq 1.75 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}\\

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


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

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/49.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. Simplified49.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 t around -inf 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9999999999999999e-139 < t < 1.75000000000000012e-222

    1. Initial program 4.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/4.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. Simplified4.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 l around inf 3.0%

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

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

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

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

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

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

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

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

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

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

    if 1.75000000000000012e-222 < t

    1. Initial program 36.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/36.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. Simplified36.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. Step-by-step derivation
      1. *-commutative36.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\left(t \cdot \sqrt{0.5}\right) \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \]
    12. Taylor expanded in x around inf 81.7%

      \[\leadsto \color{blue}{1 - 0.5 \cdot \frac{1}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}} \]
    13. Step-by-step derivation
      1. sub-neg81.7%

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

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

        \[\leadsto 1 + \left(-\frac{\color{blue}{0.5}}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}\right) \]
      4. distribute-neg-frac81.7%

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

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

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

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{\left(\sqrt{0.5} \cdot \sqrt{0.5}\right)} \cdot x} \]
      8. rem-square-sqrt81.7%

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{0.5} \cdot x} \]
    14. Simplified81.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{-139}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-222}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\ \end{array} \]

Alternative 8: 79.4% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{-141}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.9e-141)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 4.2e-223) (* t (/ (sqrt x) l)) (+ 1.0 (/ -0.5 (* x 0.5))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.9e-141) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 4.2e-223) {
		tmp = t * (sqrt(x) / l);
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-1.9d-141)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 4.2d-223) then
        tmp = t * (sqrt(x) / l)
    else
        tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.9e-141) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 4.2e-223) {
		tmp = t * (Math.sqrt(x) / l);
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1.9e-141:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 4.2e-223:
		tmp = t * (math.sqrt(x) / l)
	else:
		tmp = 1.0 + (-0.5 / (x * 0.5))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.9e-141)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 4.2e-223)
		tmp = Float64(t * Float64(sqrt(x) / l));
	else
		tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.9e-141)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 4.2e-223)
		tmp = t * (sqrt(x) / l);
	else
		tmp = 1.0 + (-0.5 / (x * 0.5));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1.9e-141], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 4.2e-223], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-141}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-223}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\

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


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

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/49.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. Simplified49.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 t around -inf 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999993e-141 < t < 4.19999999999999965e-223

    1. Initial program 4.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/4.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. Simplified4.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 x around inf 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 54.4%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1}{x}}}} \cdot t \]
    8. Taylor expanded in l around 0 54.5%

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

        \[\leadsto \color{blue}{\frac{1 \cdot \sqrt{x}}{\ell}} \cdot t \]
      2. *-lft-identity54.4%

        \[\leadsto \frac{\color{blue}{\sqrt{x}}}{\ell} \cdot t \]
    10. Simplified54.4%

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

    if 4.19999999999999965e-223 < t

    1. Initial program 36.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/36.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. Simplified36.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. Step-by-step derivation
      1. *-commutative36.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\left(t \cdot \sqrt{0.5}\right) \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \]
    12. Taylor expanded in x around inf 81.7%

      \[\leadsto \color{blue}{1 - 0.5 \cdot \frac{1}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}} \]
    13. Step-by-step derivation
      1. sub-neg81.7%

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

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

        \[\leadsto 1 + \left(-\frac{\color{blue}{0.5}}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}\right) \]
      4. distribute-neg-frac81.7%

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

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

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

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{\left(\sqrt{0.5} \cdot \sqrt{0.5}\right)} \cdot x} \]
      8. rem-square-sqrt81.7%

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{0.5} \cdot x} \]
    14. Simplified81.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{-141}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\ \end{array} \]

Alternative 9: 78.6% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-217}:\\ \;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-223}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.4e-217)
   (+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x))))
   (if (<= t 3.4e-223) (* (sqrt x) (/ t l)) (+ 1.0 (/ -0.5 (* x 0.5))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.4e-217) {
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
	} else if (t <= 3.4e-223) {
		tmp = sqrt(x) * (t / l);
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-1.4d-217)) then
        tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
    else if (t <= 3.4d-223) then
        tmp = sqrt(x) * (t / l)
    else
        tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.4e-217) {
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
	} else if (t <= 3.4e-223) {
		tmp = Math.sqrt(x) * (t / l);
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1.4e-217:
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)))
	elif t <= 3.4e-223:
		tmp = math.sqrt(x) * (t / l)
	else:
		tmp = 1.0 + (-0.5 / (x * 0.5))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.4e-217)
		tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x))));
	elseif (t <= 3.4e-223)
		tmp = Float64(sqrt(x) * Float64(t / l));
	else
		tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.4e-217)
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
	elseif (t <= 3.4e-223)
		tmp = sqrt(x) * (t / l);
	else
		tmp = 1.0 + (-0.5 / (x * 0.5));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1.4e-217], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-223], N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-217}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{-223}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\

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


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

    1. Initial program 44.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/44.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4e-217 < t < 3.3999999999999998e-223

    1. Initial program 3.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/3.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. Simplified3.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 x around inf 74.4%

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

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

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

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

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

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

        \[\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-neg74.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) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg74.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{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
      9. fma-def74.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}{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}}{x}}} \cdot t \]
      10. unpow274.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{\mathsf{fma}\left(2, \color{blue}{t \cdot t}, {\ell}^{2}\right)}{x}}} \cdot t \]
      11. unpow274.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{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x}}} \cdot t \]
    6. Simplified74.4%

      \[\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 62.8%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1}{x}}}} \cdot t \]
    8. Taylor expanded in l around 0 53.2%

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

    if 3.3999999999999998e-223 < t

    1. Initial program 36.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/36.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. Simplified36.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. Step-by-step derivation
      1. *-commutative36.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\left(t \cdot \sqrt{0.5}\right) \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \]
    12. Taylor expanded in x around inf 81.7%

      \[\leadsto \color{blue}{1 - 0.5 \cdot \frac{1}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}} \]
    13. Step-by-step derivation
      1. sub-neg81.7%

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

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

        \[\leadsto 1 + \left(-\frac{\color{blue}{0.5}}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}\right) \]
      4. distribute-neg-frac81.7%

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

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

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

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{\left(\sqrt{0.5} \cdot \sqrt{0.5}\right)} \cdot x} \]
      8. rem-square-sqrt81.7%

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{0.5} \cdot x} \]
    14. Simplified81.7%

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

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

Alternative 10: 79.1% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{-139}:\\ \;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -6.2e-139)
   (+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x))))
   (if (<= t 5.4e-223) (* t (/ (sqrt x) l)) (+ 1.0 (/ -0.5 (* x 0.5))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -6.2e-139) {
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
	} else if (t <= 5.4e-223) {
		tmp = t * (sqrt(x) / l);
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-6.2d-139)) then
        tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
    else if (t <= 5.4d-223) then
        tmp = t * (sqrt(x) / l)
    else
        tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -6.2e-139) {
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
	} else if (t <= 5.4e-223) {
		tmp = t * (Math.sqrt(x) / l);
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -6.2e-139:
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)))
	elif t <= 5.4e-223:
		tmp = t * (math.sqrt(x) / l)
	else:
		tmp = 1.0 + (-0.5 / (x * 0.5))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -6.2e-139)
		tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x))));
	elseif (t <= 5.4e-223)
		tmp = Float64(t * Float64(sqrt(x) / l));
	else
		tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -6.2e-139)
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
	elseif (t <= 5.4e-223)
		tmp = t * (sqrt(x) / l);
	else
		tmp = 1.0 + (-0.5 / (x * 0.5));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -6.2e-139], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-223], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-139}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\

\mathbf{elif}\;t \leq 5.4 \cdot 10^{-223}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\

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


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

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/49.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. Simplified49.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 t around -inf 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.1999999999999998e-139 < t < 5.39999999999999977e-223

    1. Initial program 4.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/4.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. Simplified4.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 x around inf 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 54.4%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1}{x}}}} \cdot t \]
    8. Taylor expanded in l around 0 54.5%

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

        \[\leadsto \color{blue}{\frac{1 \cdot \sqrt{x}}{\ell}} \cdot t \]
      2. *-lft-identity54.4%

        \[\leadsto \frac{\color{blue}{\sqrt{x}}}{\ell} \cdot t \]
    10. Simplified54.4%

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

    if 5.39999999999999977e-223 < t

    1. Initial program 36.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/36.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. Simplified36.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. Step-by-step derivation
      1. *-commutative36.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\left(t \cdot \sqrt{0.5}\right) \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \]
    12. Taylor expanded in x around inf 81.7%

      \[\leadsto \color{blue}{1 - 0.5 \cdot \frac{1}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}} \]
    13. Step-by-step derivation
      1. sub-neg81.7%

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

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

        \[\leadsto 1 + \left(-\frac{\color{blue}{0.5}}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}\right) \]
      4. distribute-neg-frac81.7%

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

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

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

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{\left(\sqrt{0.5} \cdot \sqrt{0.5}\right)} \cdot x} \]
      8. rem-square-sqrt81.7%

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{0.5} \cdot x} \]
    14. Simplified81.7%

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

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

Alternative 11: 76.6% accurate, 17.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1e-310)
   (+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x))))
   (+ 1.0 (/ -0.5 (* x 0.5)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-1d-310)) then
        tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
    else
        tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1e-310:
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)))
	else:
		tmp = 1.0 + (-0.5 / (x * 0.5))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1e-310)
		tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x))));
	else
		tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1e-310)
		tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
	else
		tmp = 1.0 + (-0.5 / (x * 0.5));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1e-310], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\

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


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

    1. Initial program 41.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/41.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. Simplified41.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 t around -inf 79.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 32.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.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. Simplified32.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\left(t \cdot \sqrt{0.5}\right) \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \]
    12. Taylor expanded in x around inf 74.0%

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

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

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

        \[\leadsto 1 + \left(-\frac{\color{blue}{0.5}}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}\right) \]
      4. distribute-neg-frac74.0%

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

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

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

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{\left(\sqrt{0.5} \cdot \sqrt{0.5}\right)} \cdot x} \]
      8. rem-square-sqrt74.0%

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{0.5} \cdot x} \]
    14. Simplified74.0%

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

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

Alternative 12: 76.5% accurate, 24.8× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1e-310) (+ (/ 1.0 x) -1.0) (+ 1.0 (/ -0.5 (* x 0.5)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = (1.0 / x) + -1.0;
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-1d-310)) then
        tmp = (1.0d0 / x) + (-1.0d0)
    else
        tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = (1.0 / x) + -1.0;
	} else {
		tmp = 1.0 + (-0.5 / (x * 0.5));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1e-310:
		tmp = (1.0 / x) + -1.0
	else:
		tmp = 1.0 + (-0.5 / (x * 0.5))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1e-310)
		tmp = Float64(Float64(1.0 / x) + -1.0);
	else
		tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1e-310)
		tmp = (1.0 / x) + -1.0;
	else
		tmp = 1.0 + (-0.5 / (x * 0.5));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1e-310], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + -1\\

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


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

    1. Initial program 41.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/41.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. Simplified41.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 t around -inf 79.2%

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 32.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.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. Simplified32.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\left(t \cdot \sqrt{0.5}\right) \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \]
    12. Taylor expanded in x around inf 74.0%

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

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

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

        \[\leadsto 1 + \left(-\frac{\color{blue}{0.5}}{x \cdot {\left(\sqrt{0.5}\right)}^{2}}\right) \]
      4. distribute-neg-frac74.0%

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

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

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

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{\left(\sqrt{0.5} \cdot \sqrt{0.5}\right)} \cdot x} \]
      8. rem-square-sqrt74.0%

        \[\leadsto 1 + \frac{-0.5}{\color{blue}{0.5} \cdot x} \]
    14. Simplified74.0%

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

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

Alternative 13: 76.1% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 (if (<= t -1e-310) (+ (/ 1.0 x) -1.0) 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = (1.0 / x) + -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-1d-310)) then
        tmp = (1.0d0 / x) + (-1.0d0)
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = (1.0 / x) + -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1e-310:
		tmp = (1.0 / x) + -1.0
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1e-310)
		tmp = Float64(Float64(1.0 / x) + -1.0);
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1e-310)
		tmp = (1.0 / x) + -1.0;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1e-310], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + -1\\

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


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

    1. Initial program 41.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/41.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. Simplified41.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 t around -inf 79.2%

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 32.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.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. Simplified32.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 71.5%

      \[\leadsto \color{blue}{\sqrt{0.5} \cdot \sqrt{2}} \]
    5. Step-by-step derivation
      1. *-commutative71.5%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
    6. Simplified71.5%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
    7. Step-by-step derivation
      1. sqrt-unprod72.6%

        \[\leadsto \color{blue}{\sqrt{2 \cdot 0.5}} \]
      2. metadata-eval72.6%

        \[\leadsto \sqrt{\color{blue}{1}} \]
      3. metadata-eval72.6%

        \[\leadsto \color{blue}{1} \]
    8. Applied egg-rr72.6%

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

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

Alternative 14: 75.8% accurate, 73.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 (if (<= t -1e-310) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-1d-310)) then
        tmp = -1.0d0
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1e-310:
		tmp = -1.0
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1e-310)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1e-310)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1e-310], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-1\\

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


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

    1. Initial program 41.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/41.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. Simplified41.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 t around -inf 79.2%

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 32.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.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. Simplified32.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 71.5%

      \[\leadsto \color{blue}{\sqrt{0.5} \cdot \sqrt{2}} \]
    5. Step-by-step derivation
      1. *-commutative71.5%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
    6. Simplified71.5%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
    7. Step-by-step derivation
      1. sqrt-unprod72.6%

        \[\leadsto \color{blue}{\sqrt{2 \cdot 0.5}} \]
      2. metadata-eval72.6%

        \[\leadsto \sqrt{\color{blue}{1}} \]
      3. metadata-eval72.6%

        \[\leadsto \color{blue}{1} \]
    8. Applied egg-rr72.6%

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

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

Alternative 15: 39.2% accurate, 225.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ -1 \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 -1.0)
l = abs(l);
double code(double x, double l, double t) {
	return -1.0;
}
NOTE: l should be positive before calling this function
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
l = Math.abs(l);
public static double code(double x, double l, double t) {
	return -1.0;
}
l = abs(l)
def code(x, l, t):
	return -1.0
l = abs(l)
function code(x, l, t)
	return -1.0
end
l = abs(l)
function tmp = code(x, l, t)
	tmp = -1.0;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := -1.0
\begin{array}{l}
l = |l|\\
\\
-1
\end{array}
Derivation
  1. Initial program 36.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/36.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. Simplified36.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 t around -inf 35.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto -1 \]

Reproduce

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