| Alternative 1 | |
|---|---|
| Accuracy | 86.3% |
| Cost | 28172 |

(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/ (sqrt 2.0) (sqrt (* 2.0 (+ (* l (/ l x)) (* t (+ t (/ t x)))))))))
(t_2 (+ 2.0 (+ (/ 2.0 x) (/ 2.0 x))))
(t_3 (/ l (sqrt x))))
(if (<= t -2.45e+153)
(*
t
(/
(sqrt 2.0)
(- (fma t (sqrt t_2) (* (sqrt (/ 1.0 t_2)) (* (/ l x) (/ l t)))))))
(if (<= t -5.9e-145)
t_1
(if (<= t 8e-192)
(* t (/ (sqrt 2.0) (hypot (hypot (* t (sqrt 2.0)) t_3) t_3)))
(if (<= t 1.7e-12)
t_1
(/ (sqrt 2.0) (* (sqrt 2.0) (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))))double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / sqrt((2.0 * ((l * (l / x)) + (t * (t + (t / x)))))));
double t_2 = 2.0 + ((2.0 / x) + (2.0 / x));
double t_3 = l / sqrt(x);
double tmp;
if (t <= -2.45e+153) {
tmp = t * (sqrt(2.0) / -fma(t, sqrt(t_2), (sqrt((1.0 / t_2)) * ((l / x) * (l / t)))));
} else if (t <= -5.9e-145) {
tmp = t_1;
} else if (t <= 8e-192) {
tmp = t * (sqrt(2.0) / hypot(hypot((t * sqrt(2.0)), t_3), t_3));
} else if (t <= 1.7e-12) {
tmp = t_1;
} else {
tmp = sqrt(2.0) / (sqrt(2.0) * sqrt(((x + 1.0) / (x + -1.0))));
}
return tmp;
}
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * Float64(Float64(l * Float64(l / x)) + Float64(t * Float64(t + Float64(t / x)))))))) t_2 = Float64(2.0 + Float64(Float64(2.0 / x) + Float64(2.0 / x))) t_3 = Float64(l / sqrt(x)) tmp = 0.0 if (t <= -2.45e+153) tmp = Float64(t * Float64(sqrt(2.0) / Float64(-fma(t, sqrt(t_2), Float64(sqrt(Float64(1.0 / t_2)) * Float64(Float64(l / x) * Float64(l / t))))))); elseif (t <= -5.9e-145) tmp = t_1; elseif (t <= 8e-192) tmp = Float64(t * Float64(sqrt(2.0) / hypot(hypot(Float64(t * sqrt(2.0)), t_3), t_3))); elseif (t <= 1.7e-12) tmp = t_1; else tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))); 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[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision] + N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 + N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.45e+153], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / (-N[(t * N[Sqrt[t$95$2], $MachinePrecision] + N[(N[Sqrt[N[(1.0 / t$95$2), $MachinePrecision]], $MachinePrecision] * N[(N[(l / x), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.9e-145], t$95$1, If[LessEqual[t, 8e-192], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[Sqrt[N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2 + t$95$3 ^ 2], $MachinePrecision] ^ 2 + t$95$3 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e-12], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $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 \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot \left(t + \frac{t}{x}\right)\right)}}\\
t_2 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\
t_3 := \frac{\ell}{\sqrt{x}}\\
\mathbf{if}\;t \leq -2.45 \cdot 10^{+153}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{-\mathsf{fma}\left(t, \sqrt{t_2}, \sqrt{\frac{1}{t_2}} \cdot \left(\frac{\ell}{x} \cdot \frac{\ell}{t}\right)\right)}\\
\mathbf{elif}\;t \leq -5.9 \cdot 10^{-145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-192}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{hypot}\left(\mathsf{hypot}\left(t \cdot \sqrt{2}, t_3\right), t_3\right)}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-12}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + -1}}}\\
\end{array}
if t < -2.45000000000000001e153Initial program 1.9%
Simplified1.9%
[Start]1.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/ [<=]1.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 1.4%
Simplified1.4%
[Start]1.4 | \[ \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+ [=>]1.4 | \[ \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 [=>]1.4 | \[ \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 [=>]1.4 | \[ \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 [=>]1.4 | \[ \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 [=>]1.4 | \[ \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 [=>]1.4 | \[ \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 [=>]1.4 | \[ \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 [=>]1.4 | \[ \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 [=>]1.4 | \[ \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 [<=]1.4 | \[ \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.5%
Simplified98.7%
[Start]60.5 | \[ \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 [=>]60.5 | \[ \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 [=>]60.5 | \[ \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 [=>]60.5 | \[ \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 [=>]60.5 | \[ \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 [<=]60.5 | \[ \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 [<=]60.5 | \[ \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 -2.45000000000000001e153 < t < -5.8999999999999998e-145 or 8.0000000000000008e-192 < t < 1.7e-12Initial program 43.1%
Simplified43.1%
[Start]43.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/ [<=]43.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 78.0%
Simplified78.0%
[Start]78.0 | \[ \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+ [=>]78.0 | \[ \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 [=>]78.0 | \[ \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 [=>]78.0 | \[ \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 [=>]78.0 | \[ \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 [=>]78.0 | \[ \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 [=>]78.0 | \[ \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 [=>]78.0 | \[ \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 [=>]78.0 | \[ \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 [=>]78.0 | \[ \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 [<=]78.0 | \[ \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 0 77.4%
Simplified77.4%
[Start]77.4 | \[ \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{{\ell}^{2}}{x}\right)\right)}} \cdot t
\] |
|---|---|
unpow2 [=>]77.4 | \[ \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right)}} \cdot t
\] |
Applied egg-rr88.0%
[Start]77.4 | \[ \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)\right)}} \cdot t
\] |
|---|---|
pow1/2 [=>]77.5 | \[ \frac{\sqrt{2}}{\color{blue}{{\left(\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)\right)\right)}^{0.5}}} \cdot t
\] |
sqr-pow [=>]77.3 | \[ \frac{\sqrt{2}}{\color{blue}{{\left(\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)\right)\right)}^{\left(\frac{0.5}{2}\right)} \cdot {\left(\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)\right)\right)}^{\left(\frac{0.5}{2}\right)}}} \cdot t
\] |
Simplified88.2%
[Start]88.0 | \[ \frac{\sqrt{2}}{{\left(\mathsf{fma}\left(2, \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right), \mathsf{fma}\left(\frac{\ell}{x}, \ell, \frac{\ell}{x} \cdot \ell\right)\right)\right)}^{0.25} \cdot {\left(\mathsf{fma}\left(2, \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right), \mathsf{fma}\left(\frac{\ell}{x}, \ell, \frac{\ell}{x} \cdot \ell\right)\right)\right)}^{0.25}} \cdot t
\] |
|---|---|
pow-sqr [=>]88.2 | \[ \frac{\sqrt{2}}{\color{blue}{{\left(\mathsf{fma}\left(2, \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right), \mathsf{fma}\left(\frac{\ell}{x}, \ell, \frac{\ell}{x} \cdot \ell\right)\right)\right)}^{\left(2 \cdot 0.25\right)}}} \cdot t
\] |
metadata-eval [=>]88.2 | \[ \frac{\sqrt{2}}{{\left(\mathsf{fma}\left(2, \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right), \mathsf{fma}\left(\frac{\ell}{x}, \ell, \frac{\ell}{x} \cdot \ell\right)\right)\right)}^{\color{blue}{0.5}}} \cdot t
\] |
unpow1/2 [=>]88.2 | \[ \frac{\sqrt{2}}{\color{blue}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right), \mathsf{fma}\left(\frac{\ell}{x}, \ell, \frac{\ell}{x} \cdot \ell\right)\right)}}} \cdot t
\] |
fma-udef [=>]88.2 | \[ \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right) + \mathsf{fma}\left(\frac{\ell}{x}, \ell, \frac{\ell}{x} \cdot \ell\right)}}} \cdot t
\] |
+-commutative [=>]88.2 | \[ \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{\ell}{x}, \ell, \frac{\ell}{x} \cdot \ell\right) + 2 \cdot \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right)}}} \cdot t
\] |
fma-udef [=>]88.2 | \[ \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(\frac{\ell}{x} \cdot \ell + \frac{\ell}{x} \cdot \ell\right)} + 2 \cdot \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right)}} \cdot t
\] |
count-2 [=>]88.2 | \[ \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\frac{\ell}{x} \cdot \ell\right)} + 2 \cdot \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right)}} \cdot t
\] |
distribute-lft-out [=>]88.2 | \[ \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\frac{\ell}{x} \cdot \ell + \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right)\right)}}} \cdot t
\] |
*-commutative [=>]88.2 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\ell \cdot \frac{\ell}{x}} + \mathsf{fma}\left(\frac{t}{x}, t, t \cdot t\right)\right)}} \cdot t
\] |
fma-udef [=>]88.2 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + \color{blue}{\left(\frac{t}{x} \cdot t + t \cdot t\right)}\right)}} \cdot t
\] |
+-commutative [=>]88.2 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + \color{blue}{\left(t \cdot t + \frac{t}{x} \cdot t\right)}\right)}} \cdot t
\] |
distribute-rgt-out [=>]88.2 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + \color{blue}{t \cdot \left(t + \frac{t}{x}\right)}\right)}} \cdot t
\] |
if -5.8999999999999998e-145 < t < 8.0000000000000008e-192Initial program 5.1%
Simplified5.1%
[Start]5.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/ [<=]5.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 49.6%
Simplified49.6%
[Start]49.6 | \[ \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+ [=>]49.6 | \[ \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 [=>]49.6 | \[ \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 [=>]49.6 | \[ \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 [=>]49.6 | \[ \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 [=>]49.6 | \[ \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 [=>]49.6 | \[ \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 [=>]49.6 | \[ \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 [=>]49.6 | \[ \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 [=>]49.6 | \[ \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 [<=]49.6 | \[ \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 0 49.6%
Simplified49.6%
[Start]49.6 | \[ \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{{\ell}^{2}}{x}\right)\right)}} \cdot t
\] |
|---|---|
unpow2 [=>]49.6 | \[ \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right)}} \cdot t
\] |
Applied egg-rr77.8%
[Start]49.6 | \[ \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)\right)}} \cdot t
\] |
|---|---|
+-commutative [=>]49.6 | \[ \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)\right) + \frac{\ell \cdot \ell}{x}}}} \cdot t
\] |
add-sqr-sqrt [=>]49.6 | \[ \frac{\sqrt{2}}{\sqrt{\color{blue}{\sqrt{2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)} \cdot \sqrt{2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)}} + \frac{\ell \cdot \ell}{x}}} \cdot t
\] |
add-sqr-sqrt [=>]49.7 | \[ \frac{\sqrt{2}}{\sqrt{\sqrt{2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)} \cdot \sqrt{2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)} + \color{blue}{\sqrt{\frac{\ell \cdot \ell}{x}} \cdot \sqrt{\frac{\ell \cdot \ell}{x}}}}} \cdot t
\] |
hypot-def [=>]49.6 | \[ \frac{\sqrt{2}}{\color{blue}{\mathsf{hypot}\left(\sqrt{2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\ell \cdot \ell}{x}\right)}, \sqrt{\frac{\ell \cdot \ell}{x}}\right)}} \cdot t
\] |
Taylor expanded in x around inf 77.8%
if 1.7e-12 < t Initial program 28.2%
Simplified28.2%
[Start]28.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-/l* [=>]28.2 | \[ \color{blue}{\frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}{t}}}
\] |
fma-neg [=>]28.2 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}}{t}}
\] |
remove-double-neg [<=]28.2 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \color{blue}{-\left(-\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)}, -\ell \cdot \ell\right)}}{t}}
\] |
fma-neg [<=]28.2 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{x + 1}{x - 1} \cdot \left(-\left(-\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right) - \ell \cdot \ell}}}{t}}
\] |
sub-neg [=>]28.2 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{\color{blue}{x + \left(-1\right)}} \cdot \left(-\left(-\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right) - \ell \cdot \ell}}{t}}
\] |
metadata-eval [=>]28.2 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{x + \color{blue}{-1}} \cdot \left(-\left(-\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right) - \ell \cdot \ell}}{t}}
\] |
remove-double-neg [=>]28.2 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}}{t}}
\] |
fma-def [=>]28.2 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}}{t}}
\] |
Taylor expanded in l around 0 97.0%
Simplified97.0%
[Start]97.0 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}
\] |
|---|---|
+-commutative [=>]97.0 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{\color{blue}{x + 1}}{x - 1}}}
\] |
sub-neg [=>]97.0 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{x + \left(-1\right)}}}}
\] |
metadata-eval [=>]97.0 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}}
\] |
+-commutative [=>]97.0 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}}
\] |
Final simplification90.5%
| Alternative 1 | |
|---|---|
| Accuracy | 86.3% |
| Cost | 28172 |
| Alternative 2 | |
|---|---|
| Accuracy | 85.0% |
| Cost | 20432 |
| Alternative 3 | |
|---|---|
| Accuracy | 84.9% |
| Cost | 14544 |
| Alternative 4 | |
|---|---|
| Accuracy | 77.6% |
| Cost | 7688 |
| Alternative 5 | |
|---|---|
| Accuracy | 77.1% |
| Cost | 6984 |
| Alternative 6 | |
|---|---|
| Accuracy | 77.5% |
| Cost | 6984 |
| Alternative 7 | |
|---|---|
| Accuracy | 77.5% |
| Cost | 6984 |
| Alternative 8 | |
|---|---|
| Accuracy | 76.1% |
| Cost | 836 |
| Alternative 9 | |
|---|---|
| Accuracy | 76.3% |
| Cost | 836 |
| Alternative 10 | |
|---|---|
| Accuracy | 75.7% |
| Cost | 452 |
| Alternative 11 | |
|---|---|
| Accuracy | 76.0% |
| Cost | 452 |
| Alternative 12 | |
|---|---|
| Accuracy | 75.3% |
| Cost | 196 |
| Alternative 13 | |
|---|---|
| Accuracy | 38.6% |
| Cost | 64 |
herbie shell --seed 2023160
(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)))))