| Alternative 1 | |
|---|---|
| Accuracy | 85.5% |
| Cost | 28628 |
(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 (* 2.0 (/ l (/ x l))))
(t_3
(/
(sqrt 2.0)
(/
(sqrt
(+
(* l (/ 1.0 (/ x l)))
(+ (* 2.0 (+ (* t t) (/ (* t t) x))) (* l (/ l x)))))
t))))
(if (<= t -4e+16)
-1.0
(if (<= t -1.06e-162)
t_3
(if (<= t -4.1e-199)
-1.0
(if (<= t 3.8e-308)
(/ t_1 (sqrt t_2))
(if (<= t 1.35e-161)
(/
t_1
(fma
t
(sqrt (+ (/ 2.0 x) (+ 2.0 (/ 2.0 x))))
(*
(/ t_2 t)
(* 0.5 (sqrt (/ 0.5 (+ 1.0 (+ (/ 1.0 x) (/ 1.0 x)))))))))
(if (<= t 4.5e+55) t_3 (sqrt (/ (+ -1.0 x) (+ 1.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 = 2.0 * (l / (x / l));
double t_3 = sqrt(2.0) / (sqrt(((l * (1.0 / (x / l))) + ((2.0 * ((t * t) + ((t * t) / x))) + (l * (l / x))))) / t);
double tmp;
if (t <= -4e+16) {
tmp = -1.0;
} else if (t <= -1.06e-162) {
tmp = t_3;
} else if (t <= -4.1e-199) {
tmp = -1.0;
} else if (t <= 3.8e-308) {
tmp = t_1 / sqrt(t_2);
} else if (t <= 1.35e-161) {
tmp = t_1 / fma(t, sqrt(((2.0 / x) + (2.0 + (2.0 / x)))), ((t_2 / t) * (0.5 * sqrt((0.5 / (1.0 + ((1.0 / x) + (1.0 / x))))))));
} else if (t <= 4.5e+55) {
tmp = t_3;
} else {
tmp = sqrt(((-1.0 + x) / (1.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(2.0 * Float64(l / Float64(x / l))) t_3 = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(l * Float64(1.0 / Float64(x / l))) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(l * Float64(l / x))))) / t)) tmp = 0.0 if (t <= -4e+16) tmp = -1.0; elseif (t <= -1.06e-162) tmp = t_3; elseif (t <= -4.1e-199) tmp = -1.0; elseif (t <= 3.8e-308) tmp = Float64(t_1 / sqrt(t_2)); elseif (t <= 1.35e-161) tmp = Float64(t_1 / fma(t, sqrt(Float64(Float64(2.0 / x) + Float64(2.0 + Float64(2.0 / x)))), Float64(Float64(t_2 / t) * Float64(0.5 * sqrt(Float64(0.5 / Float64(1.0 + Float64(Float64(1.0 / x) + Float64(1.0 / x))))))))); elseif (t <= 4.5e+55) tmp = t_3; else tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(1.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[(2.0 * N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(l * N[(1.0 / N[(x / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+16], -1.0, If[LessEqual[t, -1.06e-162], t$95$3, If[LessEqual[t, -4.1e-199], -1.0, If[LessEqual[t, 3.8e-308], N[(t$95$1 / N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-161], N[(t$95$1 / N[(t * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[(t$95$2 / t), $MachinePrecision] * N[(0.5 * N[Sqrt[N[(0.5 / N[(1.0 + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+55], t$95$3, N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(1.0 + x), $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 := 2 \cdot \frac{\ell}{\frac{x}{\ell}}\\
t_3 := \frac{\sqrt{2}}{\frac{\sqrt{\ell \cdot \frac{1}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \ell \cdot \frac{\ell}{x}\right)}}{t}}\\
\mathbf{if}\;t \leq -4 \cdot 10^{+16}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq -1.06 \cdot 10^{-162}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-199}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-308}:\\
\;\;\;\;\frac{t_1}{\sqrt{t_2}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-161}:\\
\;\;\;\;\frac{t_1}{\mathsf{fma}\left(t, \sqrt{\frac{2}{x} + \left(2 + \frac{2}{x}\right)}, \frac{t_2}{t} \cdot \left(0.5 \cdot \sqrt{\frac{0.5}{1 + \left(\frac{1}{x} + \frac{1}{x}\right)}}\right)\right)}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+55}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\
\end{array}
if t < -4e16 or -1.06000000000000003e-162 < t < -4.10000000000000022e-199Initial program 30.7%
Simplified30.8%
[Start]30.7 | \[ \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/ [<=]30.8 | \[ \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 1.6%
Simplified1.6%
[Start]1.6 | \[ \frac{\sqrt{2}}{\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
|---|---|
associate-*l* [=>]1.6 | \[ \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \cdot t
\] |
+-commutative [=>]1.6 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{\color{blue}{x + 1}}{x - 1}}\right)} \cdot t
\] |
sub-neg [=>]1.6 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{\color{blue}{x + \left(-1\right)}}}\right)} \cdot t
\] |
metadata-eval [=>]1.6 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}\right)} \cdot t
\] |
+-commutative [=>]1.6 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}\right)} \cdot t
\] |
Applied egg-rr36.3%
[Start]1.6 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right)} \cdot t
\] |
|---|---|
add-sqr-sqrt [=>]0.0 | \[ \color{blue}{\left(\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right)}} \cdot \sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right)}}\right)} \cdot t
\] |
sqrt-unprod [=>]38.0 | \[ \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right)} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right)}}} \cdot t
\] |
associate-/r* [=>]38.1 | \[ \sqrt{\color{blue}{\frac{\frac{\sqrt{2}}{\sqrt{2}}}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right)}} \cdot t
\] |
*-inverses [=>]38.1 | \[ \sqrt{\frac{\color{blue}{1}}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right)}} \cdot t
\] |
associate-/r* [=>]38.1 | \[ \sqrt{\frac{1}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \color{blue}{\frac{\frac{\sqrt{2}}{\sqrt{2}}}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \cdot t
\] |
*-inverses [=>]38.1 | \[ \sqrt{\frac{1}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\color{blue}{1}}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \cdot t
\] |
frac-times [=>]36.3 | \[ \sqrt{\color{blue}{\frac{1 \cdot 1}{\left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right) \cdot \left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right)}}} \cdot t
\] |
metadata-eval [=>]36.3 | \[ \sqrt{\frac{\color{blue}{1}}{\left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right) \cdot \left(t \cdot \sqrt{\frac{x + 1}{-1 + x}}\right)}} \cdot t
\] |
Taylor expanded in x around -inf 0.0%
Simplified87.6%
[Start]0.0 | \[ {\left(\sqrt{-1}\right)}^{2}
\] |
|---|---|
unpow2 [=>]0.0 | \[ \color{blue}{\sqrt{-1} \cdot \sqrt{-1}}
\] |
rem-square-sqrt [=>]87.6 | \[ \color{blue}{-1}
\] |
if -4e16 < t < -1.06000000000000003e-162 or 1.35e-161 < t < 4.49999999999999998e55Initial program 53.0%
Simplified53.0%
[Start]53.0 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\] |
|---|---|
associate-/l* [=>]53.0 | \[ \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 [=>]53.0 | \[ \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 [<=]53.0 | \[ \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 [<=]53.0 | \[ \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 [=>]53.0 | \[ \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 [=>]53.0 | \[ \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 [=>]53.0 | \[ \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}}
\] |
+-commutative [=>]53.0 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}}{t}}
\] |
fma-def [=>]53.0 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}}{t}}
\] |
Taylor expanded in x around inf 84.1%
Simplified84.1%
[Start]84.1 | \[ \frac{\sqrt{2}}{\frac{\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}}}{t}}
\] |
|---|---|
associate--l+ [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\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)}}}{t}}
\] |
unpow2 [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\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)}}{t}}
\] |
distribute-lft-out [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\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)}}{t}}
\] |
unpow2 [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\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)}}{t}}
\] |
unpow2 [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\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)}}{t}}
\] |
associate-*r/ [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \color{blue}{\frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{x}}\right)}}{t}}
\] |
mul-1-neg [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{\color{blue}{-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{x}\right)}}{t}}
\] |
unpow2 [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}}{t}}
\] |
+-commutative [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\color{blue}{\left(2 \cdot {t}^{2} + \ell \cdot \ell\right)}}{x}\right)}}{t}}
\] |
unpow2 [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\left(2 \cdot \color{blue}{\left(t \cdot t\right)} + \ell \cdot \ell\right)}{x}\right)}}{t}}
\] |
fma-udef [<=]84.1 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}}{t}}
\] |
Applied egg-rr84.1%
[Start]84.1 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}{t}}
\] |
|---|---|
associate-/l* [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{\ell}{\frac{x}{\ell}}} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}{t}}
\] |
div-inv [=>]84.1 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\ell \cdot \frac{1}{\frac{x}{\ell}}} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}{t}}
\] |
Taylor expanded in t around 0 83.6%
Simplified92.2%
[Start]83.6 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\ell \cdot \frac{1}{\frac{x}{\ell}} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - -1 \cdot \frac{{\ell}^{2}}{x}\right)}}{t}}
\] |
|---|---|
mul-1-neg [=>]83.6 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\ell \cdot \frac{1}{\frac{x}{\ell}} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \color{blue}{\left(-\frac{{\ell}^{2}}{x}\right)}\right)}}{t}}
\] |
unpow2 [=>]83.6 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\ell \cdot \frac{1}{\frac{x}{\ell}} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right)}}{t}}
\] |
associate-*r/ [<=]92.2 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\ell \cdot \frac{1}{\frac{x}{\ell}} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \left(-\color{blue}{\ell \cdot \frac{\ell}{x}}\right)\right)}}{t}}
\] |
distribute-rgt-neg-in [=>]92.2 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\ell \cdot \frac{1}{\frac{x}{\ell}} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \color{blue}{\ell \cdot \left(-\frac{\ell}{x}\right)}\right)}}{t}}
\] |
distribute-neg-frac [=>]92.2 | \[ \frac{\sqrt{2}}{\frac{\sqrt{\ell \cdot \frac{1}{\frac{x}{\ell}} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \ell \cdot \color{blue}{\frac{-\ell}{x}}\right)}}{t}}
\] |
if -4.10000000000000022e-199 < t < 3.79999999999999975e-308Initial program 1.7%
Taylor expanded in x around inf 50.7%
Simplified50.7%
[Start]50.7 | \[ \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+ [=>]50.7 | \[ \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 [=>]50.7 | \[ \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)}}
\] |
distribute-lft-out [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\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)}}
\] |
unpow2 [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\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)}}
\] |
unpow2 [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\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)}}
\] |
associate-*r/ [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \color{blue}{\frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{x}}\right)}}
\] |
mul-1-neg [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{\color{blue}{-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{x}\right)}}
\] |
+-commutative [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\color{blue}{\left(2 \cdot {t}^{2} + {\ell}^{2}\right)}}{x}\right)}}
\] |
unpow2 [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\left(2 \cdot \color{blue}{\left(t \cdot t\right)} + {\ell}^{2}\right)}{x}\right)}}
\] |
unpow2 [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\left(2 \cdot \left(t \cdot t\right) + \color{blue}{\ell \cdot \ell}\right)}{x}\right)}}
\] |
fma-udef [<=]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}}
\] |
Taylor expanded in t around 0 50.7%
Simplified53.1%
[Start]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2}}{x}}}
\] |
|---|---|
cancel-sign-sub-inv [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{{\ell}^{2}}{x} + \left(--1\right) \cdot \frac{{\ell}^{2}}{x}}}}
\] |
unpow2 [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{\ell \cdot \ell}}{x} + \left(--1\right) \cdot \frac{{\ell}^{2}}{x}}}
\] |
associate-*l/ [<=]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{\ell}{x} \cdot \ell} + \left(--1\right) \cdot \frac{{\ell}^{2}}{x}}}
\] |
metadata-eval [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{x} \cdot \ell + \color{blue}{1} \cdot \frac{{\ell}^{2}}{x}}}
\] |
unpow2 [=>]50.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{x} \cdot \ell + 1 \cdot \frac{\color{blue}{\ell \cdot \ell}}{x}}}
\] |
associate-*l/ [<=]53.1 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell}{x} \cdot \ell + 1 \cdot \color{blue}{\left(\frac{\ell}{x} \cdot \ell\right)}}}
\] |
distribute-rgt1-in [=>]53.1 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + 1\right) \cdot \left(\frac{\ell}{x} \cdot \ell\right)}}}
\] |
metadata-eval [=>]53.1 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2} \cdot \left(\frac{\ell}{x} \cdot \ell\right)}}
\] |
associate-/r/ [<=]53.1 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \color{blue}{\frac{\ell}{\frac{x}{\ell}}}}}
\] |
if 3.79999999999999975e-308 < t < 1.35e-161Initial program 2.4%
Taylor expanded in x around inf 46.2%
Simplified46.2%
[Start]46.2 | \[ \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+ [=>]46.2 | \[ \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 [=>]46.2 | \[ \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)}}
\] |
distribute-lft-out [=>]46.2 | \[ \frac{\sqrt{2} \cdot t}{\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)}}
\] |
unpow2 [=>]46.2 | \[ \frac{\sqrt{2} \cdot t}{\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)}}
\] |
unpow2 [=>]46.2 | \[ \frac{\sqrt{2} \cdot t}{\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)}}
\] |
associate-*r/ [=>]46.2 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \color{blue}{\frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{x}}\right)}}
\] |
mul-1-neg [=>]46.2 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{\color{blue}{-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{x}\right)}}
\] |
+-commutative [=>]46.2 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\color{blue}{\left(2 \cdot {t}^{2} + {\ell}^{2}\right)}}{x}\right)}}
\] |
unpow2 [=>]46.2 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\left(2 \cdot \color{blue}{\left(t \cdot t\right)} + {\ell}^{2}\right)}{x}\right)}}
\] |
unpow2 [=>]46.2 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\left(2 \cdot \left(t \cdot t\right) + \color{blue}{\ell \cdot \ell}\right)}{x}\right)}}
\] |
fma-udef [<=]46.2 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}}
\] |
Taylor expanded in t around inf 61.9%
Simplified61.9%
[Start]61.9 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot t + 0.5 \cdot \left(\frac{\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2}}{x}}{t} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}\right)}
\] |
|---|---|
*-commutative [<=]61.9 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} + 0.5 \cdot \left(\frac{\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2}}{x}}{t} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}\right)}
\] |
fma-def [=>]61.9 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{\mathsf{fma}\left(t, \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}, 0.5 \cdot \left(\frac{\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2}}{x}}{t} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}\right)\right)}}
\] |
distribute-lft-in [=>]61.9 | \[ \frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{\color{blue}{\left(2 \cdot 1 + 2 \cdot \frac{1}{x}\right)} + 2 \cdot \frac{1}{x}}, 0.5 \cdot \left(\frac{\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2}}{x}}{t} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}\right)\right)}
\] |
metadata-eval [=>]61.9 | \[ \frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{\left(\color{blue}{2} + 2 \cdot \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}, 0.5 \cdot \left(\frac{\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2}}{x}}{t} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}\right)\right)}
\] |
associate-*r/ [=>]61.9 | \[ \frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{\left(2 + \color{blue}{\frac{2 \cdot 1}{x}}\right) + 2 \cdot \frac{1}{x}}, 0.5 \cdot \left(\frac{\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2}}{x}}{t} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}\right)\right)}
\] |
metadata-eval [=>]61.9 | \[ \frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{\left(2 + \frac{\color{blue}{2}}{x}\right) + 2 \cdot \frac{1}{x}}, 0.5 \cdot \left(\frac{\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2}}{x}}{t} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}\right)\right)}
\] |
associate-*r/ [=>]61.9 | \[ \frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{\left(2 + \frac{2}{x}\right) + \color{blue}{\frac{2 \cdot 1}{x}}}, 0.5 \cdot \left(\frac{\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2}}{x}}{t} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}\right)\right)}
\] |
metadata-eval [=>]61.9 | \[ \frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{\left(2 + \frac{2}{x}\right) + \frac{\color{blue}{2}}{x}}, 0.5 \cdot \left(\frac{\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2}}{x}}{t} \cdot \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}\right)\right)}
\] |
if 4.49999999999999998e55 < t Initial program 27.8%
Simplified27.8%
[Start]27.8 | \[ \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/ [<=]27.8 | \[ \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 93.0%
Simplified93.0%
[Start]93.0 | \[ \frac{\sqrt{2}}{\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
|---|---|
associate-*l* [=>]93.0 | \[ \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \cdot t
\] |
+-commutative [=>]93.0 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{\color{blue}{x + 1}}{x - 1}}\right)} \cdot t
\] |
sub-neg [=>]93.0 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{\color{blue}{x + \left(-1\right)}}}\right)} \cdot t
\] |
metadata-eval [=>]93.0 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}\right)} \cdot t
\] |
+-commutative [=>]93.0 | \[ \frac{\sqrt{2}}{\sqrt{2} \cdot \left(t \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}\right)} \cdot t
\] |
Taylor expanded in t around 0 93.4%
Final simplification85.6%
| Alternative 1 | |
|---|---|
| Accuracy | 85.5% |
| Cost | 28628 |
| Alternative 2 | |
|---|---|
| Accuracy | 81.1% |
| Cost | 15448 |
| Alternative 3 | |
|---|---|
| Accuracy | 83.8% |
| Cost | 15448 |
| Alternative 4 | |
|---|---|
| Accuracy | 80.9% |
| Cost | 15320 |
| Alternative 5 | |
|---|---|
| Accuracy | 76.6% |
| Cost | 15192 |
| Alternative 6 | |
|---|---|
| Accuracy | 76.4% |
| Cost | 14680 |
| Alternative 7 | |
|---|---|
| Accuracy | 76.6% |
| Cost | 14032 |
| Alternative 8 | |
|---|---|
| Accuracy | 76.4% |
| Cost | 14032 |
| Alternative 9 | |
|---|---|
| Accuracy | 76.3% |
| Cost | 7112 |
| Alternative 10 | |
|---|---|
| Accuracy | 77.0% |
| Cost | 7112 |
| Alternative 11 | |
|---|---|
| Accuracy | 76.3% |
| Cost | 6984 |
| Alternative 12 | |
|---|---|
| Accuracy | 76.0% |
| Cost | 6984 |
| Alternative 13 | |
|---|---|
| Accuracy | 75.2% |
| Cost | 836 |
| Alternative 14 | |
|---|---|
| Accuracy | 74.7% |
| Cost | 452 |
| Alternative 15 | |
|---|---|
| Accuracy | 75.1% |
| Cost | 452 |
| Alternative 16 | |
|---|---|
| Accuracy | 74.4% |
| Cost | 196 |
| Alternative 17 | |
|---|---|
| Accuracy | 38.5% |
| Cost | 64 |
herbie shell --seed 2023151
(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)))))