| Alternative 1 | |
|---|---|
| Error | 12.2 |
| Cost | 21076 |
(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))) (t_2 (/ (fma 2.0 (* t t) (* l l)) x)))
(if (<= t -9e-63)
(/ t_1 (* (sqrt (/ (+ x 1.0) (+ x -1.0))) (* (sqrt 2.0) (- t))))
(if (<= t -8e-186)
(* (sqrt 2.0) (/ t (sqrt (* 2.0 (+ (* t t) t_2)))))
(if (<= t -2.1e-261)
(- (sqrt (/ 2.0 (+ 2.0 (/ 4.0 x)))))
(if (<= t -5.6e-303)
(* (/ t l) (sqrt x))
(if (<= t 3.3e-19)
(/
t_1
(sqrt
(+ (/ l (/ x l)) (+ t_2 (* 2.0 (+ (* t t) (/ t (/ x t))))))))
(/
t_1
(*
t
(sqrt
(+ (+ 2.0 (/ 4.0 (* x x))) (+ (/ 2.0 x) (/ 2.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 = t * sqrt(2.0);
double t_2 = fma(2.0, (t * t), (l * l)) / x;
double tmp;
if (t <= -9e-63) {
tmp = t_1 / (sqrt(((x + 1.0) / (x + -1.0))) * (sqrt(2.0) * -t));
} else if (t <= -8e-186) {
tmp = sqrt(2.0) * (t / sqrt((2.0 * ((t * t) + t_2))));
} else if (t <= -2.1e-261) {
tmp = -sqrt((2.0 / (2.0 + (4.0 / x))));
} else if (t <= -5.6e-303) {
tmp = (t / l) * sqrt(x);
} else if (t <= 3.3e-19) {
tmp = t_1 / sqrt(((l / (x / l)) + (t_2 + (2.0 * ((t * t) + (t / (x / t)))))));
} else {
tmp = t_1 / (t * sqrt(((2.0 + (4.0 / (x * x))) + ((2.0 / x) + (2.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(t * sqrt(2.0)) t_2 = Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x) tmp = 0.0 if (t <= -9e-63) tmp = Float64(t_1 / Float64(sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))) * Float64(sqrt(2.0) * Float64(-t)))); elseif (t <= -8e-186) tmp = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(2.0 * Float64(Float64(t * t) + t_2))))); elseif (t <= -2.1e-261) tmp = Float64(-sqrt(Float64(2.0 / Float64(2.0 + Float64(4.0 / x))))); elseif (t <= -5.6e-303) tmp = Float64(Float64(t / l) * sqrt(x)); elseif (t <= 3.3e-19) tmp = Float64(t_1 / sqrt(Float64(Float64(l / Float64(x / l)) + Float64(t_2 + Float64(2.0 * Float64(Float64(t * t) + Float64(t / Float64(x / t)))))))); else tmp = Float64(t_1 / Float64(t * sqrt(Float64(Float64(2.0 + Float64(4.0 / Float64(x * x))) + Float64(Float64(2.0 / x) + Float64(2.0 / x)))))); 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[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -9e-63], N[(t$95$1 / N[(N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * (-t)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8e-186], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(2.0 * N[(N[(t * t), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e-261], (-N[Sqrt[N[(2.0 / N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -5.6e-303], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-19], N[(t$95$1 / N[Sqrt[N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(t * N[Sqrt[N[(N[(2.0 + N[(4.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] + N[(2.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 := t \cdot \sqrt{2}\\
t_2 := \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\\
\mathbf{if}\;t \leq -9 \cdot 10^{-63}:\\
\;\;\;\;\frac{t_1}{\sqrt{\frac{x + 1}{x + -1}} \cdot \left(\sqrt{2} \cdot \left(-t\right)\right)}\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-186}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(t \cdot t + t_2\right)}}\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-261}:\\
\;\;\;\;-\sqrt{\frac{2}{2 + \frac{4}{x}}}\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-303}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-19}:\\
\;\;\;\;\frac{t_1}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(t_2 + 2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t \cdot \sqrt{\left(2 + \frac{4}{x \cdot x}\right) + \left(\frac{2}{x} + \frac{2}{x}\right)}}\\
\end{array}
if t < -8.9999999999999999e-63Initial program 39.2
Taylor expanded in t around -inf 6.4
Simplified6.4
[Start]6.4 | \[ \frac{\sqrt{2} \cdot t}{-1 \cdot \left(\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}
\] |
|---|---|
mul-1-neg [=>]6.4 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{-\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}}}
\] |
*-commutative [<=]6.4 | \[ \frac{\sqrt{2} \cdot t}{-\color{blue}{\left(t \cdot \sqrt{2}\right)} \cdot \sqrt{\frac{1 + x}{x - 1}}}
\] |
sub-neg [=>]6.4 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1 + x}{\color{blue}{x + \left(-1\right)}}}}
\] |
metadata-eval [=>]6.4 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1 + x}{x + \color{blue}{-1}}}}
\] |
+-commutative [=>]6.4 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\color{blue}{x + 1}}{x + -1}}}
\] |
+-commutative [=>]6.4 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}}
\] |
if -8.9999999999999999e-63 < t < -7.9999999999999993e-186Initial program 40.9
Simplified55.1
[Start]40.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/ [<=]41.0 | \[ \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/ [=>]40.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/ [<=]55.6 | \[ \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 [<=]55.6 | \[ \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* [<=]55.6 | \[ \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 [<=]55.6 | \[ \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* [=>]55.6 | \[ \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 [<=]55.6 | \[ \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 [=>]55.1 | \[ \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)}}}
\] |
Taylor expanded in x around -inf 15.3
Simplified15.3
[Start]15.3 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}
\] |
|---|---|
distribute-lft-out [=>]15.3 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\color{blue}{2 \cdot \left(\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}}}
\] |
+-commutative [=>]15.3 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\frac{\color{blue}{2 \cdot {t}^{2} + {\ell}^{2}}}{x} + {t}^{2}\right)}}
\] |
unpow2 [=>]15.3 | \[ \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 [<=]15.3 | \[ \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 [=>]15.3 | \[ \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 [=>]15.3 | \[ \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)}}
\] |
if -7.9999999999999993e-186 < t < -2.09999999999999996e-261Initial program 63.5
Taylor expanded in x around inf 34.6
Simplified34.6
[Start]34.6 | \[ \frac{\sqrt{2} \cdot t}{\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}}}
\] |
|---|---|
associate--l+ [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\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)}}}
\] |
unpow2 [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\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)}}
\] |
associate-/l* [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{\ell}{\frac{x}{\ell}}} + \left(\left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right) - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
distribute-lft-out [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(\color{blue}{2 \cdot \left(\frac{{t}^{2}}{x} + {t}^{2}\right)} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
+-commutative [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \color{blue}{\left({t}^{2} + \frac{{t}^{2}}{x}\right)} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
unpow2 [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(\color{blue}{t \cdot t} + \frac{{t}^{2}}{x}\right) - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
unpow2 [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{\color{blue}{t \cdot t}}{x}\right) - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
associate-/l* [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \color{blue}{\frac{t}{\frac{x}{t}}}\right) - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
associate-*r/ [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \color{blue}{\frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{x}}\right)}}
\] |
mul-1-neg [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{\color{blue}{-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{x}\right)}}
\] |
+-commutative [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{-\color{blue}{\left(2 \cdot {t}^{2} + {\ell}^{2}\right)}}{x}\right)}}
\] |
unpow2 [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{-\left(2 \cdot {t}^{2} + \color{blue}{\ell \cdot \ell}\right)}{x}\right)}}
\] |
fma-udef [<=]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{-\color{blue}{\mathsf{fma}\left(2, {t}^{2}, \ell \cdot \ell\right)}}{x}\right)}}
\] |
unpow2 [=>]34.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{-\mathsf{fma}\left(2, \color{blue}{t \cdot t}, \ell \cdot \ell\right)}{x}\right)}}
\] |
Taylor expanded in t around -inf 36.8
Simplified36.8
[Start]36.8 | \[ \frac{\sqrt{2} \cdot t}{-1 \cdot \left(t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)}
\] |
|---|---|
associate-*r* [=>]36.8 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{\left(-1 \cdot t\right) \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}}
\] |
*-commutative [=>]36.8 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot \left(-1 \cdot t\right)}}
\] |
distribute-lft-in [=>]36.8 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot 1 + 2 \cdot \frac{1}{x}\right)} + 2 \cdot \frac{1}{x}} \cdot \left(-1 \cdot t\right)}
\] |
metadata-eval [=>]36.8 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(\color{blue}{2} + 2 \cdot \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot \left(-1 \cdot t\right)}
\] |
associate-*r/ [=>]36.8 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \color{blue}{\frac{2 \cdot 1}{x}}\right) + 2 \cdot \frac{1}{x}} \cdot \left(-1 \cdot t\right)}
\] |
metadata-eval [=>]36.8 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \frac{\color{blue}{2}}{x}\right) + 2 \cdot \frac{1}{x}} \cdot \left(-1 \cdot t\right)}
\] |
associate-*r/ [=>]36.8 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \frac{2}{x}\right) + \color{blue}{\frac{2 \cdot 1}{x}}} \cdot \left(-1 \cdot t\right)}
\] |
metadata-eval [=>]36.8 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \frac{2}{x}\right) + \frac{\color{blue}{2}}{x}} \cdot \left(-1 \cdot t\right)}
\] |
mul-1-neg [=>]36.8 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \frac{2}{x}\right) + \frac{2}{x}} \cdot \color{blue}{\left(-t\right)}}
\] |
Applied egg-rr36.8
Simplified36.8
[Start]36.8 | \[ -1 \cdot \left(\sqrt{\frac{2}{2 + \frac{4}{x}}} \cdot \frac{t}{t}\right)
\] |
|---|---|
mul-1-neg [=>]36.8 | \[ \color{blue}{-\sqrt{\frac{2}{2 + \frac{4}{x}}} \cdot \frac{t}{t}}
\] |
distribute-lft-neg-in [=>]36.8 | \[ \color{blue}{\left(-\sqrt{\frac{2}{2 + \frac{4}{x}}}\right) \cdot \frac{t}{t}}
\] |
*-inverses [=>]36.8 | \[ \left(-\sqrt{\frac{2}{2 + \frac{4}{x}}}\right) \cdot \color{blue}{1}
\] |
*-rgt-identity [=>]36.8 | \[ \color{blue}{-\sqrt{\frac{2}{2 + \frac{4}{x}}}}
\] |
if -2.09999999999999996e-261 < t < -5.6e-303Initial program 62.3
Simplified60.3
[Start]62.3 | \[ \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/ [<=]62.3 | \[ \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/ [=>]59.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/ [<=]61.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 [<=]61.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* [<=]61.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 [<=]61.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* [=>]61.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 [<=]61.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 [=>]60.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)}}}
\] |
Taylor expanded in t around 0 59.4
Simplified61.8
[Start]59.4 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1} - {\ell}^{2}}}
\] |
|---|---|
associate-/l* [=>]61.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\color{blue}{\frac{1 + x}{\frac{x - 1}{{\ell}^{2}}}} - {\ell}^{2}}}
\] |
+-commutative [=>]61.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{\color{blue}{x + 1}}{\frac{x - 1}{{\ell}^{2}}} - {\ell}^{2}}}
\] |
sub-neg [=>]61.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{\frac{\color{blue}{x + \left(-1\right)}}{{\ell}^{2}}} - {\ell}^{2}}}
\] |
metadata-eval [=>]61.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{\frac{x + \color{blue}{-1}}{{\ell}^{2}}} - {\ell}^{2}}}
\] |
+-commutative [=>]61.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{\frac{\color{blue}{-1 + x}}{{\ell}^{2}}} - {\ell}^{2}}}
\] |
unpow2 [=>]61.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{\frac{-1 + x}{\color{blue}{\ell \cdot \ell}}} - {\ell}^{2}}}
\] |
unpow2 [=>]61.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{\frac{-1 + x}{\ell \cdot \ell}} - \color{blue}{\ell \cdot \ell}}}
\] |
Taylor expanded in x around inf 29.5
Simplified29.5
[Start]29.5 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{{\ell}^{2} - -1 \cdot {\ell}^{2}}{x}}}
\] |
|---|---|
cancel-sign-sub-inv [=>]29.5 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{\color{blue}{{\ell}^{2} + \left(--1\right) \cdot {\ell}^{2}}}{x}}}
\] |
unpow2 [=>]29.5 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{\color{blue}{\ell \cdot \ell} + \left(--1\right) \cdot {\ell}^{2}}{x}}}
\] |
metadata-eval [=>]29.5 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{\ell \cdot \ell + \color{blue}{1} \cdot {\ell}^{2}}{x}}}
\] |
unpow2 [=>]29.5 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{\ell \cdot \ell + 1 \cdot \color{blue}{\left(\ell \cdot \ell\right)}}{x}}}
\] |
distribute-rgt1-in [=>]29.5 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{\color{blue}{\left(1 + 1\right) \cdot \left(\ell \cdot \ell\right)}}{x}}}
\] |
metadata-eval [=>]29.5 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\frac{\color{blue}{2} \cdot \left(\ell \cdot \ell\right)}{x}}}
\] |
Taylor expanded in t around 0 36.2
if -5.6e-303 < t < 3.2999999999999998e-19Initial program 47.4
Taylor expanded in x around inf 21.3
Simplified21.3
[Start]21.3 | \[ \frac{\sqrt{2} \cdot t}{\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}}}
\] |
|---|---|
associate--l+ [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\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)}}}
\] |
unpow2 [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\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)}}
\] |
associate-/l* [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{\ell}{\frac{x}{\ell}}} + \left(\left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right) - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
distribute-lft-out [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(\color{blue}{2 \cdot \left(\frac{{t}^{2}}{x} + {t}^{2}\right)} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
+-commutative [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \color{blue}{\left({t}^{2} + \frac{{t}^{2}}{x}\right)} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
unpow2 [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(\color{blue}{t \cdot t} + \frac{{t}^{2}}{x}\right) - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
unpow2 [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{\color{blue}{t \cdot t}}{x}\right) - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
associate-/l* [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \color{blue}{\frac{t}{\frac{x}{t}}}\right) - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
associate-*r/ [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \color{blue}{\frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{x}}\right)}}
\] |
mul-1-neg [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{\color{blue}{-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{x}\right)}}
\] |
+-commutative [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{-\color{blue}{\left(2 \cdot {t}^{2} + {\ell}^{2}\right)}}{x}\right)}}
\] |
unpow2 [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{-\left(2 \cdot {t}^{2} + \color{blue}{\ell \cdot \ell}\right)}{x}\right)}}
\] |
fma-udef [<=]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{-\color{blue}{\mathsf{fma}\left(2, {t}^{2}, \ell \cdot \ell\right)}}{x}\right)}}
\] |
unpow2 [=>]21.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{-\mathsf{fma}\left(2, \color{blue}{t \cdot t}, \ell \cdot \ell\right)}{x}\right)}}
\] |
if 3.2999999999999998e-19 < t Initial program 40.2
Taylor expanded in x around -inf 37.3
Simplified37.3
[Start]37.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(\frac{{\ell}^{2}}{x} + \left(-1 \cdot \frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right) - \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{{x}^{2}} + \left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)\right)\right) - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}}}
\] |
|---|
Taylor expanded in t around inf 5.8
Simplified5.8
[Start]5.8 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + \left(2 \cdot \frac{1}{x} + 4 \cdot \frac{1}{{x}^{2}}\right)} \cdot t}
\] |
|---|---|
*-commutative [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + \left(2 \cdot \frac{1}{x} + 4 \cdot \frac{1}{{x}^{2}}\right)}}}
\] |
associate-+r+ [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\color{blue}{\left(2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}\right) + 4 \cdot \frac{1}{{x}^{2}}}}}
\] |
+-commutative [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\color{blue}{4 \cdot \frac{1}{{x}^{2}} + \left(2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}\right)}}}
\] |
distribute-lft-in [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{4 \cdot \frac{1}{{x}^{2}} + \left(\color{blue}{\left(2 \cdot 1 + 2 \cdot \frac{1}{x}\right)} + 2 \cdot \frac{1}{x}\right)}}
\] |
metadata-eval [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{4 \cdot \frac{1}{{x}^{2}} + \left(\left(\color{blue}{2} + 2 \cdot \frac{1}{x}\right) + 2 \cdot \frac{1}{x}\right)}}
\] |
associate-+l+ [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{4 \cdot \frac{1}{{x}^{2}} + \color{blue}{\left(2 + \left(2 \cdot \frac{1}{x} + 2 \cdot \frac{1}{x}\right)\right)}}}
\] |
associate-+r+ [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\color{blue}{\left(4 \cdot \frac{1}{{x}^{2}} + 2\right) + \left(2 \cdot \frac{1}{x} + 2 \cdot \frac{1}{x}\right)}}}
\] |
associate-*r/ [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\left(\color{blue}{\frac{4 \cdot 1}{{x}^{2}}} + 2\right) + \left(2 \cdot \frac{1}{x} + 2 \cdot \frac{1}{x}\right)}}
\] |
metadata-eval [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\left(\frac{\color{blue}{4}}{{x}^{2}} + 2\right) + \left(2 \cdot \frac{1}{x} + 2 \cdot \frac{1}{x}\right)}}
\] |
unpow2 [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\left(\frac{4}{\color{blue}{x \cdot x}} + 2\right) + \left(2 \cdot \frac{1}{x} + 2 \cdot \frac{1}{x}\right)}}
\] |
associate-*r/ [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\left(\frac{4}{x \cdot x} + 2\right) + \left(\color{blue}{\frac{2 \cdot 1}{x}} + 2 \cdot \frac{1}{x}\right)}}
\] |
metadata-eval [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\left(\frac{4}{x \cdot x} + 2\right) + \left(\frac{\color{blue}{2}}{x} + 2 \cdot \frac{1}{x}\right)}}
\] |
associate-*r/ [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\left(\frac{4}{x \cdot x} + 2\right) + \left(\frac{2}{x} + \color{blue}{\frac{2 \cdot 1}{x}}\right)}}
\] |
metadata-eval [=>]5.8 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\left(\frac{4}{x \cdot x} + 2\right) + \left(\frac{2}{x} + \frac{\color{blue}{2}}{x}\right)}}
\] |
Final simplification12.4
| Alternative 1 | |
|---|---|
| Error | 12.2 |
| Cost | 21076 |
| Alternative 2 | |
|---|---|
| Error | 15.1 |
| Cost | 20356 |
| Alternative 3 | |
|---|---|
| Error | 15.3 |
| Cost | 14672 |
| Alternative 4 | |
|---|---|
| Error | 15.2 |
| Cost | 14672 |
| Alternative 5 | |
|---|---|
| Error | 15.3 |
| Cost | 7376 |
| Alternative 6 | |
|---|---|
| Error | 33.7 |
| Cost | 7112 |
| Alternative 7 | |
|---|---|
| Error | 34.0 |
| Cost | 6984 |
| Alternative 8 | |
|---|---|
| Error | 32.6 |
| Cost | 6980 |
| Alternative 9 | |
|---|---|
| Error | 34.5 |
| Cost | 6852 |
| Alternative 10 | |
|---|---|
| Error | 38.6 |
| Cost | 64 |
herbie shell --seed 2023073
(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)))))