?

Average Accuracy: 32.9% → 86.7%
Time: 22.9s
Precision: binary64
Cost: 13900.00

?

\[\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{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{-51}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-148}:\\ \;\;\;\;\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+15}:\\ \;\;\;\;\sqrt{\frac{t \cdot t}{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \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 (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -1.05e-51)
     (- t_1)
     (if (<= t 3.6e-148)
       (/ t (hypot t (/ l (sqrt x))))
       (if (<= t 2.05e+15) (sqrt (/ (* t t) (fma t t (* l (/ l x))))) t_1)))))
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(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -1.05e-51) {
		tmp = -t_1;
	} else if (t <= 3.6e-148) {
		tmp = t / hypot(t, (l / sqrt(x)));
	} else if (t <= 2.05e+15) {
		tmp = sqrt(((t * t) / fma(t, t, (l * (l / x)))));
	} else {
		tmp = t_1;
	}
	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 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -1.05e-51)
		tmp = Float64(-t_1);
	elseif (t <= 3.6e-148)
		tmp = Float64(t / hypot(t, Float64(l / sqrt(x))));
	elseif (t <= 2.05e+15)
		tmp = sqrt(Float64(Float64(t * t) / fma(t, t, Float64(l * Float64(l / x)))));
	else
		tmp = t_1;
	end
	return 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[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.05e-51], (-t$95$1), If[LessEqual[t, 3.6e-148], N[(t / N[Sqrt[t ^ 2 + N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e+15], N[Sqrt[N[(N[(t * t), $MachinePrecision] / N[(t * t + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$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}}
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{-51}:\\
\;\;\;\;-t_1\\

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

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

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


\end{array}

Error?

Derivation?

  1. Split input into 4 regimes
  2. if t < -1.05000000000000001e-51

    1. Initial program 38.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. Taylor expanded in l around 0 28.0%

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

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

      [Start]28.0

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

      *-commutative [=>]28.0

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

      associate-/l* [=>]45.8

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

      unpow2 [=>]45.8

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

      sub-neg [=>]45.8

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

      metadata-eval [=>]45.8

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

      +-commutative [=>]45.8

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

      +-commutative [=>]45.8

      \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \frac{t \cdot t}{\frac{-1 + x}{\color{blue}{x + 1}}}}} \]
    4. Taylor expanded in t around -inf 89.9%

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    5. Simplified89.9%

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

      [Start]89.9

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

      mul-1-neg [=>]89.9

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

      sub-neg [=>]89.9

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

      metadata-eval [=>]89.9

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

    if -1.05000000000000001e-51 < t < 3.5999999999999998e-148

    1. Initial program 15.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. Simplified8.8%

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

      associate-*r/ [<=]15.6

      \[ \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/ [=>]17.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/ [<=]7.0

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

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

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

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

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

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

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

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

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

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

      distribute-lft-out [=>]58.4

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

      +-commutative [=>]58.4

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

      unpow2 [=>]58.4

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

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

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

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

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

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

      [Start]58.3

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

      unpow2 [=>]58.3

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

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

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

      [Start]39.4

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

      expm1-def [=>]75.5

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

      expm1-log1p [=>]76.9

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

      associate-/l* [=>]77.0

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

      associate-/l/ [=>]77.0

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

      *-inverses [=>]77.0

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

      *-rgt-identity [=>]77.0

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

    if 3.5999999999999998e-148 < t < 2.05e15

    1. Initial program 52.2%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Simplified35.0%

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

      associate-*r/ [<=]52.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/ [=>]52.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/ [<=]34.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 [<=]34.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* [<=]34.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 [<=]34.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* [=>]34.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 [<=]34.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 [=>]35.0

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

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

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

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

      distribute-lft-out [=>]85.2

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

      +-commutative [=>]85.2

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

      unpow2 [=>]85.2

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

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

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

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

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

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

      [Start]84.4

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

      unpow2 [=>]84.4

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

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

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

      [Start]86.8

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

      associate-*r/ [=>]86.8

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

      unpow2 [<=]86.8

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

      times-frac [=>]86.8

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

      metadata-eval [=>]86.8

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

      unpow2 [=>]86.8

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

      associate-/r/ [=>]86.8

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

      *-commutative [=>]86.8

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

    if 2.05e15 < t

    1. Initial program 34.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. Taylor expanded in l around 0 19.2%

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

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

      [Start]19.2

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

      *-commutative [=>]19.2

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

      associate-/l* [=>]40.8

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

      unpow2 [=>]40.8

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

      sub-neg [=>]40.8

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

      metadata-eval [=>]40.8

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

      +-commutative [=>]40.8

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

      +-commutative [=>]40.8

      \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \frac{t \cdot t}{\frac{-1 + x}{\color{blue}{x + 1}}}}} \]
    4. Taylor expanded in t around 0 92.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{-51}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-148}:\\ \;\;\;\;\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+15}:\\ \;\;\;\;\sqrt{\frac{t \cdot t}{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy79.9%
Cost13580.00
\[\begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+109}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq -2 \cdot 10^{+82}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq -500000:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\mathsf{hypot}\left(t, \frac{\ell}{\sqrt{x}}\right)}\\ \end{array} \]
Alternative 2
Accuracy76.8%
Cost7112.00
\[\begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-221}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-190}:\\ \;\;\;\;\frac{t \cdot \left(-\sqrt{x}\right)}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]
Alternative 3
Accuracy77.5%
Cost7112.00
\[\begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{-220}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-190}:\\ \;\;\;\;\frac{t \cdot \left(-\sqrt{x}\right)}{\ell}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Accuracy76.5%
Cost7048.00
\[\begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{-221}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-191}:\\ \;\;\;\;t \cdot \frac{-\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \left(\frac{0.5 + \frac{0.5 + \frac{0.5}{x}}{x}}{x} + \frac{\frac{-1}{x}}{x}\right)}{1 + \left(x + \frac{1}{x}\right)}\\ \end{array} \]
Alternative 5
Accuracy76.6%
Cost7048.00
\[\begin{array}{l} \mathbf{if}\;t \leq -1.12 \cdot 10^{-221}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-191}:\\ \;\;\;\;\frac{t \cdot \left(-\sqrt{x}\right)}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \left(\frac{0.5 + \frac{0.5 + \frac{0.5}{x}}{x}}{x} + \frac{\frac{-1}{x}}{x}\right)}{1 + \left(x + \frac{1}{x}\right)}\\ \end{array} \]
Alternative 6
Accuracy76.3%
Cost6984.00
\[\begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-221}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \left(\frac{0.5 + \frac{0.5 + \frac{0.5}{x}}{x}}{x} + \frac{\frac{-1}{x}}{x}\right)}{1 + \left(x + \frac{1}{x}\right)}\\ \end{array} \]
Alternative 7
Accuracy75.8%
Cost6984.00
\[\begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{-162}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-308}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \left(\frac{0.5 + \frac{0.5 + \frac{0.5}{x}}{x}}{x} + \frac{\frac{-1}{x}}{x}\right)}{1 + \left(x + \frac{1}{x}\right)}\\ \end{array} \]
Alternative 8
Accuracy75.7%
Cost1860.00
\[\begin{array}{l} \mathbf{if}\;t \leq -7.9 \cdot 10^{-299}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \left(\frac{0.5 + \frac{0.5 + \frac{0.5}{x}}{x}}{x} + \frac{\frac{-1}{x}}{x}\right)}{1 + \left(x + \frac{1}{x}\right)}\\ \end{array} \]
Alternative 9
Accuracy75.7%
Cost836.00
\[\begin{array}{l} \mathbf{if}\;t \leq -7.9 \cdot 10^{-299}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{x \cdot x} + \left(1 + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 10
Accuracy75.5%
Cost452.00
\[\begin{array}{l} \mathbf{if}\;t \leq -7.9 \cdot 10^{-299}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]
Alternative 11
Accuracy75.2%
Cost196.00
\[\begin{array}{l} \mathbf{if}\;t \leq -7.9 \cdot 10^{-299}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 12
Accuracy39.1%
Cost64.00
\[-1 \]

Error

Reproduce?

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