| Alternative 1 | |
|---|---|
| Error | 10.0 |
| Cost | 20620 |
(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 (/ t_1 (* t_1 (- (sqrt (/ (+ x 1.0) (+ x -1.0)))))))
(t_3
(/ t_1 (sqrt (+ (* 2.0 (* t (+ t (/ t x)))) (* 2.0 (* l (/ l x))))))))
(if (<= t -6.4e+93)
t_2
(if (<= t -8.6e-201)
t_3
(if (<= t -3.8e-285)
t_2
(if (<= t 1.65e+21) t_3 (/ (sqrt 2.0) (sqrt (+ 2.0 (/ 4.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 = t_1 / (t_1 * -sqrt(((x + 1.0) / (x + -1.0))));
double t_3 = t_1 / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x)))));
double tmp;
if (t <= -6.4e+93) {
tmp = t_2;
} else if (t <= -8.6e-201) {
tmp = t_3;
} else if (t <= -3.8e-285) {
tmp = t_2;
} else if (t <= 1.65e+21) {
tmp = t_3;
} else {
tmp = sqrt(2.0) / sqrt((2.0 + (4.0 / x)));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * sqrt(2.0d0)
t_2 = t_1 / (t_1 * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
t_3 = t_1 / sqrt(((2.0d0 * (t * (t + (t / x)))) + (2.0d0 * (l * (l / x)))))
if (t <= (-6.4d+93)) then
tmp = t_2
else if (t <= (-8.6d-201)) then
tmp = t_3
else if (t <= (-3.8d-285)) then
tmp = t_2
else if (t <= 1.65d+21) then
tmp = t_3
else
tmp = sqrt(2.0d0) / sqrt((2.0d0 + (4.0d0 / x)))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
public static double code(double x, double l, double t) {
double t_1 = t * Math.sqrt(2.0);
double t_2 = t_1 / (t_1 * -Math.sqrt(((x + 1.0) / (x + -1.0))));
double t_3 = t_1 / Math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x)))));
double tmp;
if (t <= -6.4e+93) {
tmp = t_2;
} else if (t <= -8.6e-201) {
tmp = t_3;
} else if (t <= -3.8e-285) {
tmp = t_2;
} else if (t <= 1.65e+21) {
tmp = t_3;
} else {
tmp = Math.sqrt(2.0) / Math.sqrt((2.0 + (4.0 / x)));
}
return tmp;
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
def code(x, l, t): t_1 = t * math.sqrt(2.0) t_2 = t_1 / (t_1 * -math.sqrt(((x + 1.0) / (x + -1.0)))) t_3 = t_1 / math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))) tmp = 0 if t <= -6.4e+93: tmp = t_2 elif t <= -8.6e-201: tmp = t_3 elif t <= -3.8e-285: tmp = t_2 elif t <= 1.65e+21: tmp = t_3 else: tmp = math.sqrt(2.0) / math.sqrt((2.0 + (4.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(t_1 / Float64(t_1 * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))) t_3 = Float64(t_1 / sqrt(Float64(Float64(2.0 * Float64(t * Float64(t + Float64(t / x)))) + Float64(2.0 * Float64(l * Float64(l / x)))))) tmp = 0.0 if (t <= -6.4e+93) tmp = t_2; elseif (t <= -8.6e-201) tmp = t_3; elseif (t <= -3.8e-285) tmp = t_2; elseif (t <= 1.65e+21) tmp = t_3; else tmp = Float64(sqrt(2.0) / sqrt(Float64(2.0 + Float64(4.0 / x)))); end return tmp end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
function tmp_2 = code(x, l, t) t_1 = t * sqrt(2.0); t_2 = t_1 / (t_1 * -sqrt(((x + 1.0) / (x + -1.0)))); t_3 = t_1 / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))); tmp = 0.0; if (t <= -6.4e+93) tmp = t_2; elseif (t <= -8.6e-201) tmp = t_3; elseif (t <= -3.8e-285) tmp = t_2; elseif (t <= 1.65e+21) tmp = t_3; else tmp = sqrt(2.0) / sqrt((2.0 + (4.0 / x))); end tmp_2 = 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[(t$95$1 / N[(t$95$1 * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[Sqrt[N[(N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.4e+93], t$95$2, If[LessEqual[t, -8.6e-201], t$95$3, If[LessEqual[t, -3.8e-285], t$95$2, If[LessEqual[t, 1.65e+21], t$95$3, N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 + N[(4.0 / x), $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 \sqrt{2}\\
t_2 := \frac{t_1}{t_1 \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
t_3 := \frac{t_1}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{if}\;t \leq -6.4 \cdot 10^{+93}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -8.6 \cdot 10^{-201}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-285}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+21}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2 + \frac{4}{x}}}\\
\end{array}
Results
if t < -6.4000000000000003e93 or -8.5999999999999995e-201 < t < -3.8000000000000002e-285Initial program 53.0
Taylor expanded in t around -inf 10.3
Simplified10.3
[Start]10.3 | \[ \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 [=>]10.3 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{-\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}}}
\] |
*-commutative [<=]10.3 | \[ \frac{\sqrt{2} \cdot t}{-\color{blue}{\left(t \cdot \sqrt{2}\right)} \cdot \sqrt{\frac{1 + x}{x - 1}}}
\] |
sub-neg [=>]10.3 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1 + x}{\color{blue}{x + \left(-1\right)}}}}
\] |
metadata-eval [=>]10.3 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1 + x}{x + \color{blue}{-1}}}}
\] |
+-commutative [=>]10.3 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\color{blue}{x + 1}}{x + -1}}}
\] |
+-commutative [=>]10.3 | \[ \frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}}
\] |
if -6.4000000000000003e93 < t < -8.5999999999999995e-201 or -3.8000000000000002e-285 < t < 1.65e21Initial program 37.5
Taylor expanded in x around inf 17.0
Simplified17.0
[Start]17.0 | \[ \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+ [=>]17.0 | \[ \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 [=>]17.0 | \[ \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 [=>]17.0 | \[ \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 [=>]17.0 | \[ \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 [=>]17.0 | \[ \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/ [=>]17.0 | \[ \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 [=>]17.0 | \[ \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 [=>]17.0 | \[ \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 [=>]17.0 | \[ \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 [<=]17.0 | \[ \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 [=>]17.0 | \[ \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 0 17.2
Simplified17.2
[Start]17.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) - -1 \cdot \frac{{\ell}^{2}}{x}\right)}}
\] |
|---|---|
associate-*r/ [=>]17.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 {\ell}^{2}}{x}}\right)}}
\] |
mul-1-neg [=>]17.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}{-{\ell}^{2}}}{x}\right)}}
\] |
unpow2 [=>]17.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}{\ell \cdot \ell}}{x}\right)}}
\] |
Applied egg-rr13.1
Simplified13.0
[Start]13.1 | \[ \frac{\sqrt{2} \cdot t}{{\left(\frac{\ell}{x} \cdot \ell + \mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{t}{x} \cdot t\right), \frac{\ell}{x} \cdot \ell\right)\right)}^{0.25} \cdot {\left(\frac{\ell}{x} \cdot \ell + \mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{t}{x} \cdot t\right), \frac{\ell}{x} \cdot \ell\right)\right)}^{0.25}}
\] |
|---|---|
pow-sqr [=>]13.0 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{{\left(\frac{\ell}{x} \cdot \ell + \mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{t}{x} \cdot t\right), \frac{\ell}{x} \cdot \ell\right)\right)}^{\left(2 \cdot 0.25\right)}}}
\] |
metadata-eval [=>]13.0 | \[ \frac{\sqrt{2} \cdot t}{{\left(\frac{\ell}{x} \cdot \ell + \mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{t}{x} \cdot t\right), \frac{\ell}{x} \cdot \ell\right)\right)}^{\color{blue}{0.5}}}
\] |
unpow1/2 [=>]13.0 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{\sqrt{\frac{\ell}{x} \cdot \ell + \mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{t}{x} \cdot t\right), \frac{\ell}{x} \cdot \ell\right)}}}
\] |
+-commutative [=>]13.0 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{t}{x} \cdot t\right), \frac{\ell}{x} \cdot \ell\right) + \frac{\ell}{x} \cdot \ell}}}
\] |
fma-udef [=>]13.0 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot \mathsf{fma}\left(t, t, \frac{t}{x} \cdot t\right) + \frac{\ell}{x} \cdot \ell\right)} + \frac{\ell}{x} \cdot \ell}}
\] |
associate-+l+ [=>]13.0 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \mathsf{fma}\left(t, t, \frac{t}{x} \cdot t\right) + \left(\frac{\ell}{x} \cdot \ell + \frac{\ell}{x} \cdot \ell\right)}}}
\] |
fma-udef [=>]13.0 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \color{blue}{\left(t \cdot t + \frac{t}{x} \cdot t\right)} + \left(\frac{\ell}{x} \cdot \ell + \frac{\ell}{x} \cdot \ell\right)}}
\] |
distribute-rgt-out [=>]13.0 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \color{blue}{\left(t \cdot \left(t + \frac{t}{x}\right)\right)} + \left(\frac{\ell}{x} \cdot \ell + \frac{\ell}{x} \cdot \ell\right)}}
\] |
count-2 [=>]13.0 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + \color{blue}{2 \cdot \left(\frac{\ell}{x} \cdot \ell\right)}}}
\] |
*-commutative [=>]13.0 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{x}\right)}}}
\] |
if 1.65e21 < t Initial program 43.0
Simplified43.0
[Start]43.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/ [<=]43.0 | \[ \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 [=>]43.0 | \[ \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 [=>]43.0 | \[ \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 40.3
Simplified40.3
[Start]40.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+ [=>]40.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 [=>]40.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 [=>]40.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 [=>]40.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 [=>]40.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 [=>]40.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 [=>]40.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 [=>]40.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 [<=]40.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 [=>]40.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 4.9
Simplified4.9
[Start]4.9 | \[ \frac{\sqrt{2}}{\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot t} \cdot t
\] |
|---|---|
*-commutative [<=]4.9 | \[ \frac{\sqrt{2}}{\color{blue}{t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}}} \cdot t
\] |
distribute-lft-in [=>]4.9 | \[ \frac{\sqrt{2}}{t \cdot \sqrt{\color{blue}{\left(2 \cdot 1 + 2 \cdot \frac{1}{x}\right)} + 2 \cdot \frac{1}{x}}} \cdot t
\] |
metadata-eval [=>]4.9 | \[ \frac{\sqrt{2}}{t \cdot \sqrt{\left(\color{blue}{2} + 2 \cdot \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot t
\] |
associate-*r/ [=>]4.9 | \[ \frac{\sqrt{2}}{t \cdot \sqrt{\left(2 + \color{blue}{\frac{2 \cdot 1}{x}}\right) + 2 \cdot \frac{1}{x}}} \cdot t
\] |
metadata-eval [=>]4.9 | \[ \frac{\sqrt{2}}{t \cdot \sqrt{\left(2 + \frac{\color{blue}{2}}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot t
\] |
associate-*r/ [=>]4.9 | \[ \frac{\sqrt{2}}{t \cdot \sqrt{\left(2 + \frac{2}{x}\right) + \color{blue}{\frac{2 \cdot 1}{x}}}} \cdot t
\] |
metadata-eval [=>]4.9 | \[ \frac{\sqrt{2}}{t \cdot \sqrt{\left(2 + \frac{2}{x}\right) + \frac{\color{blue}{2}}{x}}} \cdot t
\] |
Applied egg-rr4.6
Simplified4.5
[Start]4.6 | \[ e^{\mathsf{log1p}\left(t \cdot \frac{\sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}\right)} - 1
\] |
|---|---|
expm1-def [=>]4.7 | \[ \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \frac{\sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}\right)\right)}
\] |
expm1-log1p [=>]4.9 | \[ \color{blue}{t \cdot \frac{\sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}}
\] |
associate-*r/ [=>]4.6 | \[ \color{blue}{\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}}
\] |
times-frac [=>]4.5 | \[ \color{blue}{\frac{t}{t} \cdot \frac{\sqrt{2}}{\sqrt{2 + \frac{4}{x}}}}
\] |
*-inverses [=>]4.5 | \[ \color{blue}{1} \cdot \frac{\sqrt{2}}{\sqrt{2 + \frac{4}{x}}}
\] |
associate-*r/ [=>]4.5 | \[ \color{blue}{\frac{1 \cdot \sqrt{2}}{\sqrt{2 + \frac{4}{x}}}}
\] |
*-lft-identity [=>]4.5 | \[ \frac{\color{blue}{\sqrt{2}}}{\sqrt{2 + \frac{4}{x}}}
\] |
Final simplification10.0
| Alternative 1 | |
|---|---|
| Error | 10.0 |
| Cost | 20620 |
| Alternative 2 | |
|---|---|
| Error | 10.0 |
| Cost | 20620 |
| Alternative 3 | |
|---|---|
| Error | 10.1 |
| Cost | 20364 |
| Alternative 4 | |
|---|---|
| Error | 10.1 |
| Cost | 14672 |
| Alternative 5 | |
|---|---|
| Error | 15.0 |
| Cost | 14220 |
| Alternative 6 | |
|---|---|
| Error | 14.9 |
| Cost | 14220 |
| Alternative 7 | |
|---|---|
| Error | 24.0 |
| Cost | 13768 |
| Alternative 8 | |
|---|---|
| Error | 24.0 |
| Cost | 13768 |
| Alternative 9 | |
|---|---|
| Error | 24.0 |
| Cost | 13512 |
| Alternative 10 | |
|---|---|
| Error | 24.2 |
| Cost | 7364 |
| Alternative 11 | |
|---|---|
| Error | 35.9 |
| Cost | 7248 |
| Alternative 12 | |
|---|---|
| Error | 34.2 |
| Cost | 7244 |
| Alternative 13 | |
|---|---|
| Error | 35.0 |
| Cost | 6984 |
| Alternative 14 | |
|---|---|
| Error | 35.5 |
| Cost | 6852 |
| Alternative 15 | |
|---|---|
| Error | 35.1 |
| Cost | 6852 |
| Alternative 16 | |
|---|---|
| Error | 35.1 |
| Cost | 6852 |
| Alternative 17 | |
|---|---|
| Error | 35.1 |
| Cost | 6852 |
| Alternative 18 | |
|---|---|
| Error | 39.4 |
| Cost | 64 |
herbie shell --seed 2022356
(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)))))