| Alternative 1 | |
|---|---|
| Accuracy | 86.4% |
| Cost | 28108 |
(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 (* l (/ l x)))
(t_2
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(pow (cbrt t_1) 3.0)
(+ (* 2.0 (+ (* t t) (/ (* t t) x))) t_1))))))
(t_3 (+ 2.0 (+ (/ 2.0 x) (/ 2.0 x))))
(t_4 (fma t (sqrt t_3) (* (sqrt (/ 1.0 t_3)) (* (/ l x) (/ l t))))))
(if (<= t -1e+108)
(* t (/ (sqrt 2.0) (- t_4)))
(if (<= t 4.6e-246)
t_2
(if (<= t 3.5e-169)
(* t (/ (sqrt 2.0) t_4))
(if (<= t 6.8e+110)
t_2
(* t (/ (sqrt (/ (+ x -1.0) (+ x 1.0))) t))))))))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 = l * (l / x);
double t_2 = t * (sqrt(2.0) / sqrt((pow(cbrt(t_1), 3.0) + ((2.0 * ((t * t) + ((t * t) / x))) + t_1))));
double t_3 = 2.0 + ((2.0 / x) + (2.0 / x));
double t_4 = fma(t, sqrt(t_3), (sqrt((1.0 / t_3)) * ((l / x) * (l / t))));
double tmp;
if (t <= -1e+108) {
tmp = t * (sqrt(2.0) / -t_4);
} else if (t <= 4.6e-246) {
tmp = t_2;
} else if (t <= 3.5e-169) {
tmp = t * (sqrt(2.0) / t_4);
} else if (t <= 6.8e+110) {
tmp = t_2;
} else {
tmp = t * (sqrt(((x + -1.0) / (x + 1.0))) / t);
}
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(l * Float64(l / x)) t_2 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64((cbrt(t_1) ^ 3.0) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + t_1))))) t_3 = Float64(2.0 + Float64(Float64(2.0 / x) + Float64(2.0 / x))) t_4 = fma(t, sqrt(t_3), Float64(sqrt(Float64(1.0 / t_3)) * Float64(Float64(l / x) * Float64(l / t)))) tmp = 0.0 if (t <= -1e+108) tmp = Float64(t * Float64(sqrt(2.0) / Float64(-t_4))); elseif (t <= 4.6e-246) tmp = t_2; elseif (t <= 3.5e-169) tmp = Float64(t * Float64(sqrt(2.0) / t_4)); elseif (t <= 6.8e+110) tmp = t_2; else tmp = Float64(t * Float64(sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) / t)); 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[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 + N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t * N[Sqrt[t$95$3], $MachinePrecision] + N[(N[Sqrt[N[(1.0 / t$95$3), $MachinePrecision]], $MachinePrecision] * N[(N[(l / x), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+108], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / (-t$95$4)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e-246], t$95$2, If[LessEqual[t, 3.5e-169], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+110], t$95$2, N[(t * N[(N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $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 := \ell \cdot \frac{\ell}{x}\\
t_2 := t \cdot \frac{\sqrt{2}}{\sqrt{{\left(\sqrt[3]{t_1}\right)}^{3} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + t_1\right)}}\\
t_3 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\
t_4 := \mathsf{fma}\left(t, \sqrt{t_3}, \sqrt{\frac{1}{t_3}} \cdot \left(\frac{\ell}{x} \cdot \frac{\ell}{t}\right)\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+108}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{-t_4}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-246}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-169}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{t_4}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+110}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{\frac{x + -1}{x + 1}}}{t}\\
\end{array}
if t < -1e108Initial program 17.6%
Simplified17.7%
[Start]17.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-*l/ [<=]17.7 | \[ \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}
\] |
Taylor expanded in x around inf 17.9%
Simplified17.9%
[Start]17.9 | \[ \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+ [=>]17.9 | \[ \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 [=>]17.9 | \[ \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 [=>]17.9 | \[ \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 [=>]17.9 | \[ \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 [=>]17.9 | \[ \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 [=>]17.9 | \[ \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
\] |
unpow2 [=>]17.9 | \[ \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} + 2 \cdot {t}^{2}}{x}\right)\right)}} \cdot t
\] |
+-commutative [=>]17.9 | \[ \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 \cdot \ell}}{x}\right)\right)}} \cdot t
\] |
unpow2 [=>]17.9 | \[ \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 \color{blue}{\left(t \cdot t\right)} + \ell \cdot \ell}{x}\right)\right)}} \cdot t
\] |
fma-udef [<=]17.9 | \[ \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 \cdot t, \ell \cdot \ell\right)}}{x}\right)\right)}} \cdot t
\] |
Taylor expanded in t around -inf 74.7%
Simplified95.0%
[Start]74.7 | \[ \frac{\sqrt{2}}{-1 \cdot \left(\frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}\right) + -1 \cdot \left(t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)} \cdot t
\] |
|---|---|
distribute-lft-out [=>]74.7 | \[ \frac{\sqrt{2}}{\color{blue}{-1 \cdot \left(\frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} + t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)}} \cdot t
\] |
mul-1-neg [=>]74.7 | \[ \frac{\sqrt{2}}{\color{blue}{-\left(\frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} + t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)}} \cdot t
\] |
*-commutative [=>]74.7 | \[ \frac{\sqrt{2}}{-\left(\color{blue}{\sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}} + t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)} \cdot t
\] |
*-commutative [=>]74.7 | \[ \frac{\sqrt{2}}{-\left(\sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x} + \color{blue}{\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot t}\right)} \cdot t
\] |
+-commutative [<=]74.7 | \[ \frac{\sqrt{2}}{-\color{blue}{\left(\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot t + \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)}} \cdot t
\] |
*-commutative [<=]74.7 | \[ \frac{\sqrt{2}}{-\left(\color{blue}{t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} + \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)} \cdot t
\] |
if -1e108 < t < 4.5999999999999995e-246 or 3.5000000000000003e-169 < t < 6.8000000000000003e110Initial program 45.1%
Simplified45.1%
[Start]45.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-*l/ [<=]45.1 | \[ \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}
\] |
Taylor expanded in x around inf 75.8%
Simplified75.8%
[Start]75.8 | \[ \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+ [=>]75.8 | \[ \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 [=>]75.8 | \[ \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 [=>]75.8 | \[ \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 [=>]75.8 | \[ \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 [=>]75.8 | \[ \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 [=>]75.8 | \[ \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
\] |
unpow2 [=>]75.8 | \[ \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} + 2 \cdot {t}^{2}}{x}\right)\right)}} \cdot t
\] |
+-commutative [=>]75.8 | \[ \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 \cdot \ell}}{x}\right)\right)}} \cdot t
\] |
unpow2 [=>]75.8 | \[ \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 \color{blue}{\left(t \cdot t\right)} + \ell \cdot \ell}{x}\right)\right)}} \cdot t
\] |
fma-udef [<=]75.8 | \[ \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 \cdot t, \ell \cdot \ell\right)}}{x}\right)\right)}} \cdot t
\] |
Applied egg-rr75.8%
[Start]75.8 | \[ \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, t \cdot t, \ell \cdot \ell\right)}{x}\right)\right)}} \cdot t
\] |
|---|---|
add-cube-cbrt [=>]75.8 | \[ \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(\sqrt[3]{\frac{\ell \cdot \ell}{x}} \cdot \sqrt[3]{\frac{\ell \cdot \ell}{x}}\right) \cdot \sqrt[3]{\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
\] |
pow3 [=>]75.8 | \[ \frac{\sqrt{2}}{\sqrt{\color{blue}{{\left(\sqrt[3]{\frac{\ell \cdot \ell}{x}}\right)}^{3}} + \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
\] |
associate-/l* [=>]75.8 | \[ \frac{\sqrt{2}}{\sqrt{{\left(\sqrt[3]{\color{blue}{\frac{\ell}{\frac{x}{\ell}}}}\right)}^{3} + \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
\] |
associate-/r/ [=>]75.8 | \[ \frac{\sqrt{2}}{\sqrt{{\left(\sqrt[3]{\color{blue}{\frac{\ell}{x} \cdot \ell}}\right)}^{3} + \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
\] |
Taylor expanded in t around 0 75.3%
Simplified82.1%
[Start]75.3 | \[ \frac{\sqrt{2}}{\sqrt{{\left(\sqrt[3]{\frac{\ell}{x} \cdot \ell}\right)}^{3} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{{\ell}^{2}}{x}\right)\right)}} \cdot t
\] |
|---|---|
unpow2 [=>]75.3 | \[ \frac{\sqrt{2}}{\sqrt{{\left(\sqrt[3]{\frac{\ell}{x} \cdot \ell}\right)}^{3} + \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
\] |
associate-*r/ [<=]82.1 | \[ \frac{\sqrt{2}}{\sqrt{{\left(\sqrt[3]{\frac{\ell}{x} \cdot \ell}\right)}^{3} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\color{blue}{\ell \cdot \frac{\ell}{x}}\right)\right)}} \cdot t
\] |
if 4.5999999999999995e-246 < t < 3.5000000000000003e-169Initial program 0.9%
Simplified0.9%
[Start]0.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-*l/ [<=]0.9 | \[ \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}
\] |
Taylor expanded in x around inf 45.8%
Simplified45.8%
[Start]45.8 | \[ \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+ [=>]45.8 | \[ \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 [=>]45.8 | \[ \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 [=>]45.8 | \[ \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 [=>]45.8 | \[ \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 [=>]45.8 | \[ \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 [=>]45.8 | \[ \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
\] |
unpow2 [=>]45.8 | \[ \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} + 2 \cdot {t}^{2}}{x}\right)\right)}} \cdot t
\] |
+-commutative [=>]45.8 | \[ \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 \cdot \ell}}{x}\right)\right)}} \cdot t
\] |
unpow2 [=>]45.8 | \[ \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 \color{blue}{\left(t \cdot t\right)} + \ell \cdot \ell}{x}\right)\right)}} \cdot t
\] |
fma-udef [<=]45.8 | \[ \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 \cdot t, \ell \cdot \ell\right)}}{x}\right)\right)}} \cdot t
\] |
Taylor expanded in t around inf 60.7%
Simplified60.6%
[Start]60.7 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot t + \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}} \cdot t
\] |
|---|---|
*-commutative [<=]60.7 | \[ \frac{\sqrt{2}}{\color{blue}{t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} + \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}} \cdot t
\] |
fma-def [=>]60.7 | \[ \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(t, \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}, \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)}} \cdot t
\] |
distribute-lft-in [=>]60.7 | \[ \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{\color{blue}{\left(2 \cdot 1 + 2 \cdot \frac{1}{x}\right)} + 2 \cdot \frac{1}{x}}, \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)} \cdot t
\] |
metadata-eval [=>]60.7 | \[ \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{\left(\color{blue}{2} + 2 \cdot \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}, \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)} \cdot t
\] |
associate-+l+ [=>]60.7 | \[ \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{\color{blue}{2 + \left(2 \cdot \frac{1}{x} + 2 \cdot \frac{1}{x}\right)}}, \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)} \cdot t
\] |
associate-*r/ [=>]60.7 | \[ \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{2 + \left(\color{blue}{\frac{2 \cdot 1}{x}} + 2 \cdot \frac{1}{x}\right)}, \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)} \cdot t
\] |
metadata-eval [=>]60.7 | \[ \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{2 + \left(\frac{\color{blue}{2}}{x} + 2 \cdot \frac{1}{x}\right)}, \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)} \cdot t
\] |
associate-*r/ [=>]60.7 | \[ \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{2 + \left(\frac{2}{x} + \color{blue}{\frac{2 \cdot 1}{x}}\right)}, \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)} \cdot t
\] |
metadata-eval [=>]60.7 | \[ \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{2 + \left(\frac{2}{x} + \frac{\color{blue}{2}}{x}\right)}, \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}\right)} \cdot t
\] |
if 6.8000000000000003e110 < t Initial program 17.9%
Simplified17.9%
[Start]17.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-*l/ [<=]17.9 | \[ \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}
\] |
Taylor expanded in t around inf 5.4%
Simplified5.4%
[Start]5.4 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\left(1 + x\right) \cdot {t}^{2}}{x - 1}}} \cdot t
\] |
|---|---|
*-commutative [=>]5.4 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\color{blue}{{t}^{2} \cdot \left(1 + x\right)}}{x - 1}}} \cdot t
\] |
unpow2 [=>]5.4 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\color{blue}{\left(t \cdot t\right)} \cdot \left(1 + x\right)}{x - 1}}} \cdot t
\] |
+-commutative [<=]5.4 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\left(t \cdot t\right) \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t
\] |
sub-neg [=>]5.4 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\left(t \cdot t\right) \cdot \left(x + 1\right)}{\color{blue}{x + \left(-1\right)}}}} \cdot t
\] |
metadata-eval [=>]5.4 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\left(t \cdot t\right) \cdot \left(x + 1\right)}{x + \color{blue}{-1}}}} \cdot t
\] |
+-commutative [=>]5.4 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\left(t \cdot t\right) \cdot \left(x + 1\right)}{\color{blue}{-1 + x}}}} \cdot t
\] |
Taylor expanded in t around 0 96.6%
Simplified96.6%
[Start]96.6 | \[ \left(\sqrt{\frac{x - 1}{1 + x}} \cdot \frac{1}{t}\right) \cdot t
\] |
|---|---|
associate-*r/ [=>]96.6 | \[ \color{blue}{\frac{\sqrt{\frac{x - 1}{1 + x}} \cdot 1}{t}} \cdot t
\] |
sub-neg [=>]96.6 | \[ \frac{\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}} \cdot 1}{t} \cdot t
\] |
metadata-eval [=>]96.6 | \[ \frac{\sqrt{\frac{x + \color{blue}{-1}}{1 + x}} \cdot 1}{t} \cdot t
\] |
+-commutative [<=]96.6 | \[ \frac{\sqrt{\frac{x + -1}{\color{blue}{x + 1}}} \cdot 1}{t} \cdot t
\] |
*-rgt-identity [=>]96.6 | \[ \frac{\color{blue}{\sqrt{\frac{x + -1}{x + 1}}}}{t} \cdot t
\] |
metadata-eval [<=]96.6 | \[ \frac{\sqrt{\frac{x + \color{blue}{\left(-1\right)}}{x + 1}}}{t} \cdot t
\] |
sub-neg [<=]96.6 | \[ \frac{\sqrt{\frac{\color{blue}{x - 1}}{x + 1}}}{t} \cdot t
\] |
+-commutative [=>]96.6 | \[ \frac{\sqrt{\frac{x - 1}{\color{blue}{1 + x}}}}{t} \cdot t
\] |
sub-neg [=>]96.6 | \[ \frac{\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}}}{t} \cdot t
\] |
metadata-eval [=>]96.6 | \[ \frac{\sqrt{\frac{x + \color{blue}{-1}}{1 + x}}}{t} \cdot t
\] |
Final simplification86.2%
| Alternative 1 | |
|---|---|
| Accuracy | 86.4% |
| Cost | 28108 |
| Alternative 2 | |
|---|---|
| Accuracy | 85.4% |
| Cost | 27920 |
| Alternative 3 | |
|---|---|
| Accuracy | 76.1% |
| Cost | 21448 |
| Alternative 4 | |
|---|---|
| Accuracy | 76.2% |
| Cost | 14792 |
| Alternative 5 | |
|---|---|
| Accuracy | 76.1% |
| Cost | 13316 |
| Alternative 6 | |
|---|---|
| Accuracy | 75.5% |
| Cost | 7632 |
| Alternative 7 | |
|---|---|
| Accuracy | 74.9% |
| Cost | 7376 |
| Alternative 8 | |
|---|---|
| Accuracy | 75.4% |
| Cost | 7376 |
| Alternative 9 | |
|---|---|
| Accuracy | 74.4% |
| Cost | 7312 |
| Alternative 10 | |
|---|---|
| Accuracy | 74.8% |
| Cost | 7312 |
| Alternative 11 | |
|---|---|
| Accuracy | 75.2% |
| Cost | 1348 |
| Alternative 12 | |
|---|---|
| Accuracy | 75.1% |
| Cost | 836 |
| Alternative 13 | |
|---|---|
| Accuracy | 74.8% |
| Cost | 196 |
| Alternative 14 | |
|---|---|
| Accuracy | 37.4% |
| Cost | 64 |
herbie shell --seed 2023147
(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)))))