| Alternative 1 | |
|---|---|
| Accuracy | 85.2% |
| Cost | 14672 |
(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 (+ 2.0 (+ (/ 2.0 x) (/ 2.0 x)))))
(if (<= t -9.6e+85)
(- (sqrt (/ (+ -1.0 x) (+ x 1.0))))
(if (or (<= t 1.1e-306) (and (not (<= t 5.4e-164)) (<= t 1e+91)))
(*
(sqrt 2.0)
(/ t (sqrt (* 2.0 (+ (* (* t t) (+ 1.0 (/ 2.0 x))) (/ l (/ x l)))))))
(*
t
(/
(sqrt 2.0)
(fma t (sqrt t_1) (* (sqrt (/ 1.0 t_1)) (* (/ l x) (/ l 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 = 2.0 + ((2.0 / x) + (2.0 / x));
double tmp;
if (t <= -9.6e+85) {
tmp = -sqrt(((-1.0 + x) / (x + 1.0)));
} else if ((t <= 1.1e-306) || (!(t <= 5.4e-164) && (t <= 1e+91))) {
tmp = sqrt(2.0) * (t / sqrt((2.0 * (((t * t) * (1.0 + (2.0 / x))) + (l / (x / l))))));
} else {
tmp = t * (sqrt(2.0) / fma(t, sqrt(t_1), (sqrt((1.0 / t_1)) * ((l / x) * (l / 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(2.0 + Float64(Float64(2.0 / x) + Float64(2.0 / x))) tmp = 0.0 if (t <= -9.6e+85) tmp = Float64(-sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0)))); elseif ((t <= 1.1e-306) || (!(t <= 5.4e-164) && (t <= 1e+91))) tmp = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(2.0 * Float64(Float64(Float64(t * t) * Float64(1.0 + Float64(2.0 / x))) + Float64(l / Float64(x / l))))))); else tmp = Float64(t * Float64(sqrt(2.0) / fma(t, sqrt(t_1), Float64(sqrt(Float64(1.0 / t_1)) * Float64(Float64(l / x) * Float64(l / 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[(2.0 + N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.6e+85], (-N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[Or[LessEqual[t, 1.1e-306], And[N[Not[LessEqual[t, 5.4e-164]], $MachinePrecision], LessEqual[t, 1e+91]]], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(2.0 * N[(N[(N[(t * t), $MachinePrecision] * N[(1.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(t * N[Sqrt[t$95$1], $MachinePrecision] + N[(N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision] * N[(N[(l / x), $MachinePrecision] * N[(l / t), $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 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\
\mathbf{if}\;t \leq -9.6 \cdot 10^{+85}:\\
\;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-306} \lor \neg \left(t \leq 5.4 \cdot 10^{-164}\right) \land t \leq 10^{+91}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \frac{2}{x}\right) + \frac{\ell}{\frac{x}{\ell}}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{t_1}, \sqrt{\frac{1}{t_1}} \cdot \left(\frac{\ell}{x} \cdot \frac{\ell}{t}\right)\right)}\\
\end{array}
if t < -9.59999999999999986e85Initial program 22.6%
Simplified22.6%
[Start]22.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/ [<=]22.6 | \[ \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}
\] |
+-commutative [=>]22.6 | \[ \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \cdot t
\] |
fma-def [=>]22.6 | \[ \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \cdot t
\] |
Applied egg-rr22.7%
[Start]22.6 | \[ \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t
\] |
|---|---|
clear-num [=>]22.6 | \[ \color{blue}{\frac{1}{\frac{\sqrt{\frac{x + 1}{x - 1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}} \cdot t
\] |
associate-*l/ [=>]22.6 | \[ \color{blue}{\frac{1 \cdot t}{\frac{\sqrt{\frac{x + 1}{x - 1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}}
\] |
*-un-lft-identity [<=]22.6 | \[ \frac{\color{blue}{t}}{\frac{\sqrt{\frac{x + 1}{x - 1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}{\sqrt{2}}}
\] |
sqrt-undiv [=>]22.7 | \[ \frac{t}{\color{blue}{\sqrt{\frac{\frac{x + 1}{x - 1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}}
\] |
sub-neg [=>]22.7 | \[ \frac{t}{\sqrt{\frac{\frac{x + 1}{\color{blue}{x + \left(-1\right)}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}
\] |
metadata-eval [=>]22.7 | \[ \frac{t}{\sqrt{\frac{\frac{x + 1}{x + \color{blue}{-1}} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}{2}}}
\] |
Taylor expanded in t around -inf 95.6%
Simplified95.6%
[Start]95.6 | \[ -1 \cdot \sqrt{\frac{x - 1}{1 + x}}
\] |
|---|---|
mul-1-neg [=>]95.6 | \[ \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}}
\] |
sub-neg [=>]95.6 | \[ -\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}}
\] |
metadata-eval [=>]95.6 | \[ -\sqrt{\frac{x + \color{blue}{-1}}{1 + x}}
\] |
+-commutative [<=]95.6 | \[ -\sqrt{\frac{x + -1}{\color{blue}{x + 1}}}
\] |
+-commutative [=>]95.6 | \[ -\sqrt{\frac{\color{blue}{-1 + x}}{x + 1}}
\] |
if -9.59999999999999986e85 < t < 1.10000000000000008e-306 or 5.4000000000000003e-164 < t < 1.00000000000000008e91Initial program 45.2%
Simplified35.6%
[Start]45.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/ [<=]45.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/ [=>]39.9 | \[ \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.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 [<=]34.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* [<=]34.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 [<=]34.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* [=>]34.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 [<=]34.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 [=>]35.6 | \[ \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 76.8%
Simplified76.8%
[Start]76.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}
\] |
|---|---|
distribute-lft-out [=>]76.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\color{blue}{2 \cdot \left(\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}}}
\] |
+-commutative [=>]76.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\frac{\color{blue}{2 \cdot {t}^{2} + {\ell}^{2}}}{x} + {t}^{2}\right)}}
\] |
unpow2 [=>]76.8 | \[ \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 [<=]76.8 | \[ \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 [=>]76.8 | \[ \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 [=>]76.8 | \[ \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)}}
\] |
Taylor expanded in t around 0 76.8%
Simplified84.0%
[Start]76.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\frac{{\ell}^{2}}{x} + {t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)\right)}}
\] |
|---|---|
+-commutative [=>]76.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right) + \frac{{\ell}^{2}}{x}\right)}}}
\] |
unpow2 [=>]76.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \left(1 + 2 \cdot \frac{1}{x}\right) + \frac{{\ell}^{2}}{x}\right)}}
\] |
associate-*r/ [=>]76.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \color{blue}{\frac{2 \cdot 1}{x}}\right) + \frac{{\ell}^{2}}{x}\right)}}
\] |
metadata-eval [=>]76.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \frac{\color{blue}{2}}{x}\right) + \frac{{\ell}^{2}}{x}\right)}}
\] |
unpow2 [=>]76.8 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \frac{2}{x}\right) + \frac{\color{blue}{\ell \cdot \ell}}{x}\right)}}
\] |
associate-/l* [=>]84.0 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \frac{2}{x}\right) + \color{blue}{\frac{\ell}{\frac{x}{\ell}}}\right)}}
\] |
if 1.10000000000000008e-306 < t < 5.4000000000000003e-164 or 1.00000000000000008e91 < t Initial program 16.6%
Simplified16.6%
[Start]16.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/ [<=]16.6 | \[ \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}
\] |
+-commutative [=>]16.6 | \[ \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \cdot t
\] |
fma-def [=>]16.6 | \[ \frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \cdot t
\] |
Taylor expanded in x around inf 30.3%
Simplified30.3%
[Start]30.3 | \[ \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+ [=>]30.3 | \[ \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 [=>]30.3 | \[ \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 [=>]30.3 | \[ \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 [=>]30.3 | \[ \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 [=>]30.3 | \[ \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 [=>]30.3 | \[ \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
\] |
+-commutative [=>]30.3 | \[ \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}^{2}}}{x}\right)\right)}} \cdot t
\] |
unpow2 [=>]30.3 | \[ \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 {t}^{2} + \color{blue}{\ell \cdot \ell}}{x}\right)\right)}} \cdot t
\] |
fma-udef [<=]30.3 | \[ \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}^{2}, \ell \cdot \ell\right)}}{x}\right)\right)}} \cdot t
\] |
unpow2 [=>]30.3 | \[ \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, \color{blue}{t \cdot t}, \ell \cdot \ell\right)}{x}\right)\right)}} \cdot t
\] |
Taylor expanded in t around inf 72.8%
Simplified85.5%
[Start]72.8 | \[ \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 [<=]72.8 | \[ \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 [=>]72.8 | \[ \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 [=>]72.8 | \[ \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 [=>]72.8 | \[ \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+ [=>]72.8 | \[ \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/ [=>]72.8 | \[ \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 [=>]72.8 | \[ \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/ [=>]72.8 | \[ \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 [=>]72.8 | \[ \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
\] |
Final simplification87.0%
| Alternative 1 | |
|---|---|
| Accuracy | 85.2% |
| Cost | 14672 |
| Alternative 2 | |
|---|---|
| Accuracy | 81.3% |
| Cost | 8656 |
| Alternative 3 | |
|---|---|
| Accuracy | 76.8% |
| Cost | 7240 |
| Alternative 4 | |
|---|---|
| Accuracy | 75.5% |
| Cost | 7112 |
| Alternative 5 | |
|---|---|
| Accuracy | 76.1% |
| Cost | 7112 |
| Alternative 6 | |
|---|---|
| Accuracy | 75.2% |
| Cost | 6984 |
| Alternative 7 | |
|---|---|
| Accuracy | 75.4% |
| Cost | 196 |
| Alternative 8 | |
|---|---|
| Accuracy | 38.5% |
| Cost | 64 |
herbie shell --seed 2023135
(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)))))