?

Average Error: 43.0 → 6.4
Time: 23.7s
Precision: binary64
Cost: 20820

?

\[\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 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ t_2 := -\sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{if}\;t \leq -1.75 \cdot 10^{+15}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-180}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.28 \cdot 10^{-194}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-159}:\\ \;\;\;\;\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+102}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{-1 + x}}}\\ \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 (* (sqrt 2.0) (/ t (sqrt (* 2.0 (+ (* l (/ l x)) (* t t)))))))
        (t_2 (- (sqrt (/ (+ -1.0 x) (+ x 1.0))))))
   (if (<= t -1.75e+15)
     t_2
     (if (<= t -1.2e-180)
       t_1
       (if (<= t -1.28e-194)
         t_2
         (if (<= t 3.5e-159)
           (/ t (hypot t (/ l (sqrt x))))
           (if (<= t 1.35e+102)
             t_1
             (*
              (sqrt 2.0)
              (/
               t
               (* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ -1.0 x)))))))))))))
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 = sqrt(2.0) * (t / sqrt((2.0 * ((l * (l / x)) + (t * t)))));
	double t_2 = -sqrt(((-1.0 + x) / (x + 1.0)));
	double tmp;
	if (t <= -1.75e+15) {
		tmp = t_2;
	} else if (t <= -1.2e-180) {
		tmp = t_1;
	} else if (t <= -1.28e-194) {
		tmp = t_2;
	} else if (t <= 3.5e-159) {
		tmp = t / hypot(t, (l / sqrt(x)));
	} else if (t <= 1.35e+102) {
		tmp = t_1;
	} else {
		tmp = sqrt(2.0) * (t / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (-1.0 + x)))));
	}
	return tmp;
}
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 = Math.sqrt(2.0) * (t / Math.sqrt((2.0 * ((l * (l / x)) + (t * t)))));
	double t_2 = -Math.sqrt(((-1.0 + x) / (x + 1.0)));
	double tmp;
	if (t <= -1.75e+15) {
		tmp = t_2;
	} else if (t <= -1.2e-180) {
		tmp = t_1;
	} else if (t <= -1.28e-194) {
		tmp = t_2;
	} else if (t <= 3.5e-159) {
		tmp = t / Math.hypot(t, (l / Math.sqrt(x)));
	} else if (t <= 1.35e+102) {
		tmp = t_1;
	} else {
		tmp = Math.sqrt(2.0) * (t / ((t * Math.sqrt(2.0)) * Math.sqrt(((x + 1.0) / (-1.0 + x)))));
	}
	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 = math.sqrt(2.0) * (t / math.sqrt((2.0 * ((l * (l / x)) + (t * t)))))
	t_2 = -math.sqrt(((-1.0 + x) / (x + 1.0)))
	tmp = 0
	if t <= -1.75e+15:
		tmp = t_2
	elif t <= -1.2e-180:
		tmp = t_1
	elif t <= -1.28e-194:
		tmp = t_2
	elif t <= 3.5e-159:
		tmp = t / math.hypot(t, (l / math.sqrt(x)))
	elif t <= 1.35e+102:
		tmp = t_1
	else:
		tmp = math.sqrt(2.0) * (t / ((t * math.sqrt(2.0)) * math.sqrt(((x + 1.0) / (-1.0 + x)))))
	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(sqrt(2.0) * Float64(t / sqrt(Float64(2.0 * Float64(Float64(l * Float64(l / x)) + Float64(t * t))))))
	t_2 = Float64(-sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0))))
	tmp = 0.0
	if (t <= -1.75e+15)
		tmp = t_2;
	elseif (t <= -1.2e-180)
		tmp = t_1;
	elseif (t <= -1.28e-194)
		tmp = t_2;
	elseif (t <= 3.5e-159)
		tmp = Float64(t / hypot(t, Float64(l / sqrt(x))));
	elseif (t <= 1.35e+102)
		tmp = t_1;
	else
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x))))));
	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 = sqrt(2.0) * (t / sqrt((2.0 * ((l * (l / x)) + (t * t)))));
	t_2 = -sqrt(((-1.0 + x) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -1.75e+15)
		tmp = t_2;
	elseif (t <= -1.2e-180)
		tmp = t_1;
	elseif (t <= -1.28e-194)
		tmp = t_2;
	elseif (t <= 3.5e-159)
		tmp = t / hypot(t, (l / sqrt(x)));
	elseif (t <= 1.35e+102)
		tmp = t_1;
	else
		tmp = sqrt(2.0) * (t / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (-1.0 + x)))));
	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[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(2.0 * N[(N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision] + N[(t * t), $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, -1.75e+15], t$95$2, If[LessEqual[t, -1.2e-180], t$95$1, If[LessEqual[t, -1.28e-194], t$95$2, If[LessEqual[t, 3.5e-159], N[(t / N[Sqrt[t ^ 2 + N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+102], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\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 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\
t_2 := -\sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{+15}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.2 \cdot 10^{-180}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.28 \cdot 10^{-194}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-159}:\\
\;\;\;\;\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\\

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+102}:\\
\;\;\;\;t_1\\

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


\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 < -1.75e15 or -1.1999999999999999e-180 < t < -1.2800000000000001e-194

    1. Initial program 43.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. Simplified43.3

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

      associate-*r/ [<=]43.4

      \[ \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/ [=>]54.4

      \[ \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/ [<=]43.4

      \[ \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 [<=]43.4

      \[ \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* [<=]43.4

      \[ \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 [<=]43.4

      \[ \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* [=>]43.4

      \[ \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 [<=]43.4

      \[ \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 [=>]43.3

      \[ \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 6.2

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

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

      [Start]6.2

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

      mul-1-neg [=>]6.2

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

      *-commutative [=>]6.2

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

      sub-neg [=>]6.2

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

      metadata-eval [=>]6.2

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

      +-commutative [=>]6.2

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

      +-commutative [=>]6.2

      \[ -\sqrt{\frac{-1 + x}{\color{blue}{x + 1}}} \cdot \left(\sqrt{2} \cdot \sqrt{0.5}\right) \]
    5. Applied egg-rr5.3

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

    if -1.75e15 < t < -1.1999999999999999e-180 or 3.50000000000000002e-159 < t < 1.3500000000000001e102

    1. Initial program 28.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. Simplified37.4

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

      associate-*r/ [<=]28.9

      \[ \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/ [=>]32.5

      \[ \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/ [<=]37.9

      \[ \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 [<=]37.9

      \[ \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* [<=]37.9

      \[ \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 [<=]37.9

      \[ \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* [=>]37.9

      \[ \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 [<=]37.9

      \[ \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 [=>]37.4

      \[ \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 x around -inf 10.7

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    4. Simplified10.7

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

      [Start]10.7

      \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}} \]

      distribute-lft-out [=>]10.7

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

      +-commutative [=>]10.7

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

      unpow2 [=>]10.7

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

      fma-udef [<=]10.7

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

      unpow2 [=>]10.7

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

      unpow2 [=>]10.7

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

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

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

      [Start]11.0

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

      unpow2 [=>]11.0

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

      associate-*r/ [<=]6.3

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

    if -1.2800000000000001e-194 < t < 3.50000000000000002e-159

    1. Initial program 63.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. Simplified61.5

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

      associate-*r/ [<=]63.1

      \[ \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/ [=>]61.6

      \[ \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/ [<=]63.1

      \[ \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 [<=]63.1

      \[ \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* [<=]63.1

      \[ \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 [<=]63.1

      \[ \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* [=>]63.1

      \[ \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 [<=]63.1

      \[ \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 [=>]61.5

      \[ \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 x around -inf 31.9

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    4. Simplified31.9

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

      [Start]31.9

      \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}} \]

      distribute-lft-out [=>]31.9

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

      +-commutative [=>]31.9

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

      unpow2 [=>]31.9

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

      fma-udef [<=]31.9

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

      unpow2 [=>]31.9

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

      unpow2 [=>]31.9

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

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

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

      [Start]31.9

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

      unpow2 [=>]31.9

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

      associate-*r/ [<=]30.2

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\sqrt{2}}{\sqrt{2}} \cdot \frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\right)} - 1} \]
    8. Simplified12.6

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

      [Start]36.2

      \[ e^{\mathsf{log1p}\left(\frac{\sqrt{2}}{\sqrt{2}} \cdot \frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\right)} - 1 \]

      expm1-def [=>]12.6

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

      expm1-log1p [=>]12.6

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

      associate-*r/ [=>]12.6

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

      *-inverses [=>]12.6

      \[ \frac{\color{blue}{1} \cdot t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)} \]
    9. Applied egg-rr36.2

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\right)} - 1} \]
    10. Simplified12.6

      \[\leadsto \color{blue}{\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}} \]
      Proof

      [Start]36.2

      \[ e^{\mathsf{log1p}\left(\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\right)} - 1 \]

      expm1-def [=>]12.6

      \[ \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\right)\right)} \]

      expm1-log1p [=>]12.6

      \[ \color{blue}{\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}} \]

    if 1.3500000000000001e102 < t

    1. Initial program 50.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. Simplified50.4

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

      associate-*r/ [<=]50.4

      \[ \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/ [=>]61.0

      \[ \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/ [<=]50.4

      \[ \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 [<=]50.4

      \[ \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* [<=]50.4

      \[ \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 [<=]50.4

      \[ \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* [=>]50.4

      \[ \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 [<=]50.4

      \[ \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 [=>]50.4

      \[ \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 3.0

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{+15}:\\ \;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-180}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ \mathbf{elif}\;t \leq -1.28 \cdot 10^{-194}:\\ \;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-159}:\\ \;\;\;\;\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+102}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{-1 + x}}}\\ \end{array} \]

Alternatives

Alternative 1
Error6.4
Cost14420
\[\begin{array}{l} t_1 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ t_2 := -\sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{if}\;t \leq -1.7 \cdot 10^{+15}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-194}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-160}:\\ \;\;\;\;\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+100}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{1 + \frac{2}{x}}}\\ \end{array} \]
Alternative 2
Error10.1
Cost13448
\[\begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{-69}:\\ \;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-69}:\\ \;\;\;\;\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{1 + \frac{2}{x}}}\\ \end{array} \]
Alternative 3
Error15.1
Cost7376
\[\begin{array}{l} t_1 := -1 + \frac{1}{x}\\ t_2 := \frac{t}{\sqrt{\ell \cdot \frac{\ell}{x}}}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-174}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-303}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-172}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{1 + \frac{2}{x}}}\\ \end{array} \]
Alternative 4
Error14.9
Cost7376
\[\begin{array}{l} t_1 := \frac{t}{\sqrt{\ell \cdot \frac{\ell}{x}}}\\ t_2 := -\sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{-112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-303}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-172}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{1 + \frac{2}{x}}}\\ \end{array} \]
Alternative 5
Error15.3
Cost6980
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{1 + \frac{2}{x}}}\\ \end{array} \]
Alternative 6
Error15.5
Cost452
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 7
Error15.8
Cost196
\[\begin{array}{l} \mathbf{if}\;t \leq 4.6 \cdot 10^{-303}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 8
Error39.3
Cost64
\[-1 \]

Error

Reproduce?

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