?

Average Error: 66.67% → 14.15%
Time: 22.8s
Precision: binary64
Cost: 14672

?

\[\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}} \]
\[\begin{array}{l} t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ t_2 := \sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{if}\;t \leq -8 \cdot 10^{+51}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-213}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \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)))))
(FPCore (x l t)
 :precision binary64
 (let* ((t_1
         (*
          t
          (/
           (sqrt 2.0)
           (sqrt (+ (* 2.0 (* t (+ t (/ t x)))) (* 2.0 (* l (/ l x))))))))
        (t_2 (sqrt (/ (+ -1.0 x) (+ x 1.0)))))
   (if (<= t -8e+51)
     (- t_2)
     (if (<= t -2.75e-185)
       t_1
       (if (<= t -9e-213) -1.0 (if (<= t 5e+70) t_1 t_2))))))
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)));
}
double code(double x, double l, double t) {
	double t_1 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
	double t_2 = sqrt(((-1.0 + x) / (x + 1.0)));
	double tmp;
	if (t <= -8e+51) {
		tmp = -t_2;
	} else if (t <= -2.75e-185) {
		tmp = t_1;
	} else if (t <= -9e-213) {
		tmp = -1.0;
	} else if (t <= 5e+70) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end 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) :: t_2
    real(8) :: tmp
    t_1 = t * (sqrt(2.0d0) / sqrt(((2.0d0 * (t * (t + (t / x)))) + (2.0d0 * (l * (l / x))))))
    t_2 = sqrt((((-1.0d0) + x) / (x + 1.0d0)))
    if (t <= (-8d+51)) then
        tmp = -t_2
    else if (t <= (-2.75d-185)) then
        tmp = t_1
    else if (t <= (-9d-213)) then
        tmp = -1.0d0
    else if (t <= 5d+70) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
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)));
}
public static double code(double x, double l, double t) {
	double t_1 = t * (Math.sqrt(2.0) / Math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
	double t_2 = Math.sqrt(((-1.0 + x) / (x + 1.0)));
	double tmp;
	if (t <= -8e+51) {
		tmp = -t_2;
	} else if (t <= -2.75e-185) {
		tmp = t_1;
	} else if (t <= -9e-213) {
		tmp = -1.0;
	} else if (t <= 5e+70) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
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)))
def code(x, l, t):
	t_1 = t * (math.sqrt(2.0) / math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))))
	t_2 = math.sqrt(((-1.0 + x) / (x + 1.0)))
	tmp = 0
	if t <= -8e+51:
		tmp = -t_2
	elif t <= -2.75e-185:
		tmp = t_1
	elif t <= -9e-213:
		tmp = -1.0
	elif t <= 5e+70:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
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 code(x, l, t)
	t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(2.0 * Float64(t * Float64(t + Float64(t / x)))) + Float64(2.0 * Float64(l * Float64(l / x)))))))
	t_2 = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -8e+51)
		tmp = Float64(-t_2);
	elseif (t <= -2.75e-185)
		tmp = t_1;
	elseif (t <= -9e-213)
		tmp = -1.0;
	elseif (t <= 5e+70)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
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
function tmp_2 = code(x, l, t)
	t_1 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
	t_2 = sqrt(((-1.0 + x) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -8e+51)
		tmp = -t_2;
	elseif (t <= -2.75e-185)
		tmp = t_1;
	elseif (t <= -9e-213)
		tmp = -1.0;
	elseif (t <= 5e+70)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
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]
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -8e+51], (-t$95$2), If[LessEqual[t, -2.75e-185], t$95$1, If[LessEqual[t, -9e-213], -1.0, If[LessEqual[t, 5e+70], t$95$1, t$95$2]]]]]]
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
t_2 := \sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{if}\;t \leq -8 \cdot 10^{+51}:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t \leq -2.75 \cdot 10^{-185}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -9 \cdot 10^{-213}:\\
\;\;\;\;-1\\

\mathbf{elif}\;t \leq 5 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 4 regimes
  2. if t < -8e51

    1. Initial program 69.97

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

      \[\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} \]
      Proof

      [Start]69.97

      \[ \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}} \]

      associate-*l/ [<=]69.93

      \[ \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} \]

      +-commutative [=>]69.93

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

      fma-def [=>]69.93

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

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

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    5. Simplified4.75

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

      [Start]4.75

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

      mul-1-neg [=>]4.75

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

      sub-neg [=>]4.75

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

      metadata-eval [=>]4.75

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

      +-commutative [<=]4.75

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

      +-commutative [=>]4.75

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

    if -8e51 < t < -2.7499999999999999e-185 or -9.0000000000000002e-213 < t < 5.0000000000000002e70

    1. Initial program 61.45

      \[\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. Simplified61.38

      \[\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} \]
      Proof

      [Start]61.45

      \[ \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}} \]

      associate-*l/ [<=]61.38

      \[ \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} \]

      +-commutative [=>]61.38

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

      fma-def [=>]61.38

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

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

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

      [Start]27.22

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

      associate--l+ [=>]27.22

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

      unpow2 [=>]27.22

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

      distribute-lft-out [=>]27.22

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

      unpow2 [=>]27.22

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

      unpow2 [=>]27.22

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

      mul-1-neg [=>]27.22

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

      +-commutative [=>]27.22

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

      unpow2 [=>]27.22

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

      fma-udef [<=]27.22

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

      unpow2 [=>]27.22

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

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

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

      [Start]27.57

      \[ \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{{\ell}^{2}}{x}\right)\right)}} \cdot t \]

      unpow2 [=>]27.57

      \[ \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right)}} \cdot t \]
    7. Applied egg-rr22.11

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

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

      [Start]22.11

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

      pow-sqr [=>]21.91

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

      metadata-eval [=>]21.91

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

      unpow1/2 [=>]21.91

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

      +-commutative [=>]21.91

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

      fma-udef [=>]21.91

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

      associate-+l+ [=>]21.91

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

      fma-udef [=>]21.91

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

      distribute-rgt-out [=>]21.91

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

      count-2 [=>]21.91

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

      *-commutative [=>]21.91

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

    if -2.7499999999999999e-185 < t < -9.0000000000000002e-213

    1. Initial program 98.18

      \[\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. Simplified98.18

      \[\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} \]
      Proof

      [Start]98.18

      \[ \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}} \]

      associate-*l/ [<=]98.18

      \[ \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} \]

      +-commutative [=>]98.18

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

      fma-def [=>]98.18

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot t}} \cdot t \]
    4. Applied egg-rr100

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{1}{t}}{t}}} \cdot t \]
    5. Taylor expanded in t around -inf 51.47

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

    if 5.0000000000000002e70 < t

    1. Initial program 71.99

      \[\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. Simplified71.95

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

      [Start]71.99

      \[ \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}} \]

      associate-*r/ [<=]72.04

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

      associate-*l/ [=>]91.19

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

      associate-*r/ [<=]72.02

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

      *-lft-identity [<=]72.02

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

      associate-*r* [<=]72.02

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

      *-commutative [<=]72.02

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

      associate-*r* [=>]72.02

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

      *-commutative [<=]72.02

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

      fma-neg [=>]71.95

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

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

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

      [Start]4.85

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

      associate-*l* [=>]4.85

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

      +-commutative [=>]4.85

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+51}:\\ \;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-185}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-213}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+70}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\ \end{array} \]

Alternatives

Alternative 1
Error20.1%
Cost13768
\[\begin{array}{l} t_1 := \sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{if}\;t \leq -3 \cdot 10^{-213}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-208}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\frac{2 \cdot \left(\ell \cdot \ell\right)}{x}}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error19.92%
Cost13768
\[\begin{array}{l} t_1 := \sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{-210}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-211}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error21.21%
Cost7112
\[\begin{array}{l} \mathbf{if}\;t \leq -2.65 \cdot 10^{-213}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-212}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\ \end{array} \]
Alternative 4
Error20.59%
Cost7112
\[\begin{array}{l} t_1 := \sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{if}\;t \leq -3.1 \cdot 10^{-214}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-213}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error22.04%
Cost6984
\[\begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-210}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-212}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 6
Error21.44%
Cost6984
\[\begin{array}{l} \mathbf{if}\;t \leq -5.3 \cdot 10^{-214}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-211}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 7
Error21.55%
Cost6984
\[\begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{-208}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-209}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 8
Error22.93%
Cost836
\[\begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 9
Error23.04%
Cost452
\[\begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]
Alternative 10
Error23.35%
Cost196
\[\begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 11
Error60.81%
Cost64
\[-1 \]

Error

Reproduce?

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