| Alternative 1 | |
|---|---|
| Error | 17.5% |
| Cost | 34768 |
(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 (/ (* l l) x))
(t_3 (+ 2.0 (+ (/ 2.0 x) (/ 2.0 x))))
(t_4 (fma 2.0 (* t t) (* l l))))
(if (<= t -1.65e-6)
(- (/ 1.0 x) (+ 1.0 (/ 0.5 (* x x))))
(if (<= t -9e-152)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_2 (+ t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))))))
(if (<= t -1.6e-273)
(/
t_1
(-
(* (sqrt (/ 1.0 t_3)) (* -0.5 (/ (* 2.0 (* l (/ l x))) t)))
(* t (sqrt t_3))))
(if (<= t 1.02e+36)
(/
t_1
(sqrt
(+
(fma
-1.0
(/ (- (- t_4) t_4) (* x x))
(* 2.0 (+ (* t t) (/ t (/ x t)))))
(+ (/ l (/ x l)) (/ t_4 x)))))
(sqrt (/ (+ x -1.0) (+ 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 = (l * l) / x;
double t_3 = 2.0 + ((2.0 / x) + (2.0 / x));
double t_4 = fma(2.0, (t * t), (l * l));
double tmp;
if (t <= -1.65e-6) {
tmp = (1.0 / x) - (1.0 + (0.5 / (x * x)));
} else if (t <= -9e-152) {
tmp = t * (sqrt(2.0) / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
} else if (t <= -1.6e-273) {
tmp = t_1 / ((sqrt((1.0 / t_3)) * (-0.5 * ((2.0 * (l * (l / x))) / t))) - (t * sqrt(t_3)));
} else if (t <= 1.02e+36) {
tmp = t_1 / sqrt((fma(-1.0, ((-t_4 - t_4) / (x * x)), (2.0 * ((t * t) + (t / (x / t))))) + ((l / (x / l)) + (t_4 / x))));
} else {
tmp = sqrt(((x + -1.0) / (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(Float64(l * l) / x) t_3 = Float64(2.0 + Float64(Float64(2.0 / x) + Float64(2.0 / x))) t_4 = fma(2.0, Float64(t * t), Float64(l * l)) tmp = 0.0 if (t <= -1.65e-6) tmp = Float64(Float64(1.0 / x) - Float64(1.0 + Float64(0.5 / Float64(x * x)))); elseif (t <= -9e-152) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_2 + Float64(t_2 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x)))))))); elseif (t <= -1.6e-273) tmp = Float64(t_1 / Float64(Float64(sqrt(Float64(1.0 / t_3)) * Float64(-0.5 * Float64(Float64(2.0 * Float64(l * Float64(l / x))) / t))) - Float64(t * sqrt(t_3)))); elseif (t <= 1.02e+36) tmp = Float64(t_1 / sqrt(Float64(fma(-1.0, Float64(Float64(Float64(-t_4) - t_4) / Float64(x * x)), Float64(2.0 * Float64(Float64(t * t) + Float64(t / Float64(x / t))))) + Float64(Float64(l / Float64(x / l)) + Float64(t_4 / x))))); else tmp = sqrt(Float64(Float64(x + -1.0) / 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[(N[(l * l), $MachinePrecision] / x), $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[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e-6], N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9e-152], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$2 + N[(t$95$2 + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.6e-273], N[(t$95$1 / N[(N[(N[Sqrt[N[(1.0 / t$95$3), $MachinePrecision]], $MachinePrecision] * N[(-0.5 * N[(N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e+36], N[(t$95$1 / N[Sqrt[N[(N[(-1.0 * N[(N[((-t$95$4) - t$95$4), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $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 := \frac{\ell \cdot \ell}{x}\\
t_3 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\
t_4 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{-6}:\\
\;\;\;\;\frac{1}{x} - \left(1 + \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-152}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_2 + \left(t_2 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-273}:\\
\;\;\;\;\frac{t_1}{\sqrt{\frac{1}{t_3}} \cdot \left(-0.5 \cdot \frac{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}{t}\right) - t \cdot \sqrt{t_3}}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+36}:\\
\;\;\;\;\frac{t_1}{\sqrt{\mathsf{fma}\left(-1, \frac{\left(-t_4\right) - t_4}{x \cdot x}, 2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right)\right) + \left(\frac{\ell}{\frac{x}{\ell}} + \frac{t_4}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
if t < -1.65000000000000008e-6Initial program 64.8
Taylor expanded in t around -inf 7.61
Simplified7.61
[Start]7.61 | \[ \frac{\sqrt{2} \cdot t}{-1 \cdot \left(\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}
\] |
|---|---|
mul-1-neg [=>]7.61 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{-\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}}}
\] |
*-commutative [<=]7.61 | \[ \frac{\sqrt{2} \cdot t}{-\color{blue}{\left(t \cdot \sqrt{2}\right)} \cdot \sqrt{\frac{1 + x}{x - 1}}}
\] |
sub-neg [=>]7.61 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1 + x}{\color{blue}{x + \left(-1\right)}}}}
\] |
metadata-eval [=>]7.61 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1 + x}{x + \color{blue}{-1}}}}
\] |
+-commutative [=>]7.61 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\color{blue}{x + 1}}{x + -1}}}
\] |
+-commutative [=>]7.61 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}}
\] |
Taylor expanded in x around inf 8.05
Simplified8.05
[Start]8.05 | \[ \frac{1}{x} - \left(1 + 0.5 \cdot \frac{1}{{x}^{2}}\right)
\] |
|---|---|
associate-*r/ [=>]8.05 | \[ \frac{1}{x} - \left(1 + \color{blue}{\frac{0.5 \cdot 1}{{x}^{2}}}\right)
\] |
metadata-eval [=>]8.05 | \[ \frac{1}{x} - \left(1 + \frac{\color{blue}{0.5}}{{x}^{2}}\right)
\] |
unpow2 [=>]8.05 | \[ \frac{1}{x} - \left(1 + \frac{0.5}{\color{blue}{x \cdot x}}\right)
\] |
if -1.65000000000000008e-6 < t < -9.0000000000000008e-152Initial program 48.46
Simplified48.38
[Start]48.46 | \[ \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/ [<=]48.38 | \[ \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 [=>]48.38 | \[ \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 [=>]48.38 | \[ \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 14.35
Simplified14.35
[Start]14.35 | \[ \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+ [=>]14.35 | \[ \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 [=>]14.35 | \[ \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 [=>]14.35 | \[ \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 [=>]14.35 | \[ \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 [=>]14.35 | \[ \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 [=>]14.35 | \[ \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 [=>]14.35 | \[ \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 [=>]14.35 | \[ \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 [<=]14.35 | \[ \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 [=>]14.35 | \[ \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 0 14.68
Simplified14.68
[Start]14.68 | \[ \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 [=>]14.68 | \[ \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
\] |
if -9.0000000000000008e-152 < t < -1.59999999999999995e-273Initial program 95.79
Taylor expanded in x around inf 51.46
Simplified51.46
[Start]51.46 | \[ \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+ [=>]51.46 | \[ \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 [=>]51.46 | \[ \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 [=>]51.46 | \[ \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 [=>]51.46 | \[ \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 [=>]51.46 | \[ \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/ [=>]51.46 | \[ \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 [=>]51.46 | \[ \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 [=>]51.46 | \[ \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 [=>]51.46 | \[ \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 {t}^{2} + \color{blue}{\ell \cdot \ell}\right)}{x}\right)}}
\] |
fma-udef [<=]51.46 | \[ \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}^{2}, \ell \cdot \ell\right)}}{x}\right)}}
\] |
unpow2 [=>]51.46 | \[ \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{-\mathsf{fma}\left(2, \color{blue}{t \cdot t}, \ell \cdot \ell\right)}{x}\right)}}
\] |
Taylor expanded in t around -inf 38.12
Simplified38.12
[Start]38.12 | \[ \frac{\sqrt{2} \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) + -1 \cdot \left(t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)}
\] |
|---|---|
*-commutative [=>]38.12 | \[ \frac{\sqrt{2} \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) + -1 \cdot \color{blue}{\left(\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot t\right)}}
\] |
mul-1-neg [=>]38.12 | \[ \frac{\sqrt{2} \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) + \color{blue}{\left(-\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot t\right)}}
\] |
unsub-neg [=>]38.12 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{-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) - \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot t}}
\] |
if -1.59999999999999995e-273 < t < 1.02000000000000003e36Initial program 67.91
Taylor expanded in x around -inf 34.69
Simplified34.69
[Start]34.69 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(\frac{{\ell}^{2}}{x} + \left(-1 \cdot \frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right) - \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{{x}^{2}} + \left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)\right)\right) - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}}}
\] |
|---|---|
+-commutative [=>]34.69 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(\left(-1 \cdot \frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right) - \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{{x}^{2}} + \left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)\right) + \frac{{\ell}^{2}}{x}\right)} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}}}
\] |
associate--l+ [=>]34.69 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(-1 \cdot \frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right) - \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{{x}^{2}} + \left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)\right) + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}}
\] |
if 1.02000000000000003e36 < t Initial program 70.02
Applied egg-rr71.27
Taylor expanded in t around inf 6.52
Final simplification17.61
| Alternative 1 | |
|---|---|
| Error | 17.5% |
| Cost | 34768 |
| Alternative 2 | |
|---|---|
| Error | 16.7% |
| Cost | 22092 |
| Alternative 3 | |
|---|---|
| Error | 18.11% |
| Cost | 21712 |
| Alternative 4 | |
|---|---|
| Error | 18.16% |
| Cost | 20944 |
| Alternative 5 | |
|---|---|
| Error | 18.18% |
| Cost | 15056 |
| Alternative 6 | |
|---|---|
| Error | 23.06% |
| Cost | 13768 |
| Alternative 7 | |
|---|---|
| Error | 22.55% |
| Cost | 7504 |
| Alternative 8 | |
|---|---|
| Error | 23.09% |
| Cost | 7504 |
| Alternative 9 | |
|---|---|
| Error | 25.42% |
| Cost | 7244 |
| Alternative 10 | |
|---|---|
| Error | 26.16% |
| Cost | 6984 |
| Alternative 11 | |
|---|---|
| Error | 23.84% |
| Cost | 836 |
| Alternative 12 | |
|---|---|
| Error | 23.93% |
| Cost | 452 |
| Alternative 13 | |
|---|---|
| Error | 24.2% |
| Cost | 196 |
| Alternative 14 | |
|---|---|
| Error | 61.2% |
| Cost | 64 |
herbie shell --seed 2023090
(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)))))