| Alternative 1 | |
|---|---|
| Accuracy | 76.2% |
| Cost | 7504 |
(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))))))))))
(if (<= t -1.45e-39)
(- (sqrt (/ (+ -1.0 x) (+ x 1.0))))
(if (<= t -1.7e-183)
t_1
(if (<= t -1.15e-289)
-1.0
(if (<= t 2.7e+98) t_1 (+ 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) / sqrt((2.0 * ((l * (l / x)) + (t * (t + (t / x)))))));
double tmp;
if (t <= -1.45e-39) {
tmp = -sqrt(((-1.0 + x) / (x + 1.0)));
} else if (t <= -1.7e-183) {
tmp = t_1;
} else if (t <= -1.15e-289) {
tmp = -1.0;
} else if (t <= 2.7e+98) {
tmp = t_1;
} else {
tmp = 1.0 + (-1.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) :: tmp
t_1 = t * (sqrt(2.0d0) / sqrt((2.0d0 * ((l * (l / x)) + (t * (t + (t / x)))))))
if (t <= (-1.45d-39)) then
tmp = -sqrt((((-1.0d0) + x) / (x + 1.0d0)))
else if (t <= (-1.7d-183)) then
tmp = t_1
else if (t <= (-1.15d-289)) then
tmp = -1.0d0
else if (t <= 2.7d+98) then
tmp = t_1
else
tmp = 1.0d0 + ((-1.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) / Math.sqrt((2.0 * ((l * (l / x)) + (t * (t + (t / x)))))));
double tmp;
if (t <= -1.45e-39) {
tmp = -Math.sqrt(((-1.0 + x) / (x + 1.0)));
} else if (t <= -1.7e-183) {
tmp = t_1;
} else if (t <= -1.15e-289) {
tmp = -1.0;
} else if (t <= 2.7e+98) {
tmp = t_1;
} else {
tmp = 1.0 + (-1.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) / math.sqrt((2.0 * ((l * (l / x)) + (t * (t + (t / x))))))) tmp = 0 if t <= -1.45e-39: tmp = -math.sqrt(((-1.0 + x) / (x + 1.0))) elif t <= -1.7e-183: tmp = t_1 elif t <= -1.15e-289: tmp = -1.0 elif t <= 2.7e+98: tmp = t_1 else: tmp = 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 * Float64(sqrt(2.0) / sqrt(Float64(2.0 * Float64(Float64(l * Float64(l / x)) + Float64(t * Float64(t + Float64(t / x)))))))) tmp = 0.0 if (t <= -1.45e-39) tmp = Float64(-sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0)))); elseif (t <= -1.7e-183) tmp = t_1; elseif (t <= -1.15e-289) tmp = -1.0; elseif (t <= 2.7e+98) tmp = t_1; else tmp = Float64(1.0 + Float64(-1.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) / sqrt((2.0 * ((l * (l / x)) + (t * (t + (t / x))))))); tmp = 0.0; if (t <= -1.45e-39) tmp = -sqrt(((-1.0 + x) / (x + 1.0))); elseif (t <= -1.7e-183) tmp = t_1; elseif (t <= -1.15e-289) tmp = -1.0; elseif (t <= 2.7e+98) tmp = t_1; else tmp = 1.0 + (-1.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[(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]}, If[LessEqual[t, -1.45e-39], (-N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.7e-183], t$95$1, If[LessEqual[t, -1.15e-289], -1.0, If[LessEqual[t, 2.7e+98], t$95$1, N[(1.0 + N[(-1.0 / x), $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)}}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{-39}:\\
\;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-183}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-289}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+98}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
Results
if t < -1.44999999999999994e-39Initial program 38.2%
Simplified38.2%
[Start]38.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/ [<=]38.2 | \[ \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 91.0%
Simplified91.0%
[Start]91.0 | \[ \frac{\sqrt{2}}{-1 \cdot \left(\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}\right)} \cdot t
\] |
|---|---|
associate-*r* [=>]91.0 | \[ \frac{\sqrt{2}}{\color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot t\right)\right) \cdot \sqrt{\frac{1 + x}{x - 1}}}} \cdot t
\] |
*-commutative [<=]91.0 | \[ \frac{\sqrt{2}}{\left(-1 \cdot \color{blue}{\left(t \cdot \sqrt{2}\right)}\right) \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
neg-mul-1 [<=]91.0 | \[ \frac{\sqrt{2}}{\color{blue}{\left(-t \cdot \sqrt{2}\right)} \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
distribute-rgt-neg-in [=>]91.0 | \[ \frac{\sqrt{2}}{\color{blue}{\left(t \cdot \left(-\sqrt{2}\right)\right)} \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
+-commutative [<=]91.0 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{\color{blue}{x + 1}}{x - 1}}} \cdot t
\] |
sub-neg [=>]91.0 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{x + 1}{\color{blue}{x + \left(-1\right)}}}} \cdot t
\] |
metadata-eval [=>]91.0 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \cdot t
\] |
+-commutative [=>]91.0 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \cdot t
\] |
Taylor expanded in t around 0 91.4%
Simplified91.4%
[Start]91.4 | \[ -1 \cdot \sqrt{\frac{x - 1}{1 + x}}
\] |
|---|---|
mul-1-neg [=>]91.4 | \[ \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}}
\] |
sub-neg [=>]91.4 | \[ -\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}}
\] |
metadata-eval [=>]91.4 | \[ -\sqrt{\frac{x + \color{blue}{-1}}{1 + x}}
\] |
+-commutative [=>]91.4 | \[ -\sqrt{\frac{\color{blue}{-1 + x}}{1 + x}}
\] |
+-commutative [=>]91.4 | \[ -\sqrt{\frac{-1 + x}{\color{blue}{x + 1}}}
\] |
if -1.44999999999999994e-39 < t < -1.70000000000000007e-183 or -1.1500000000000001e-289 < t < 2.7e98Initial program 39.6%
Simplified39.7%
[Start]39.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/ [<=]39.7 | \[ \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 72.8%
Simplified72.8%
[Start]72.8 | \[ \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+ [=>]72.8 | \[ \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 [=>]72.8 | \[ \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 [=>]72.8 | \[ \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 [=>]72.8 | \[ \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 [=>]72.8 | \[ \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 [=>]72.8 | \[ \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 [=>]72.8 | \[ \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 [=>]72.8 | \[ \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 [=>]72.8 | \[ \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 [<=]72.8 | \[ \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 72.4%
Simplified72.4%
[Start]72.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 [=>]72.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-rr78.7%
[Start]72.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 [=>]72.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 [=>]72.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
\] |
Simplified78.9%
[Start]78.7 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 [=>]78.9 | \[ \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 -1.70000000000000007e-183 < t < -1.1500000000000001e-289Initial program 1.3%
Simplified1.3%
[Start]1.3 | \[ \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.3 | \[ \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 37.5%
Simplified37.5%
[Start]37.5 | \[ \frac{\sqrt{2}}{-1 \cdot \left(\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}\right)} \cdot t
\] |
|---|---|
associate-*r* [=>]37.5 | \[ \frac{\sqrt{2}}{\color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot t\right)\right) \cdot \sqrt{\frac{1 + x}{x - 1}}}} \cdot t
\] |
*-commutative [<=]37.5 | \[ \frac{\sqrt{2}}{\left(-1 \cdot \color{blue}{\left(t \cdot \sqrt{2}\right)}\right) \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
neg-mul-1 [<=]37.5 | \[ \frac{\sqrt{2}}{\color{blue}{\left(-t \cdot \sqrt{2}\right)} \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
distribute-rgt-neg-in [=>]37.5 | \[ \frac{\sqrt{2}}{\color{blue}{\left(t \cdot \left(-\sqrt{2}\right)\right)} \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
+-commutative [<=]37.5 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{\color{blue}{x + 1}}{x - 1}}} \cdot t
\] |
sub-neg [=>]37.5 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{x + 1}{\color{blue}{x + \left(-1\right)}}}} \cdot t
\] |
metadata-eval [=>]37.5 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \cdot t
\] |
+-commutative [=>]37.5 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \cdot t
\] |
Taylor expanded in x around inf 37.4%
if 2.7e98 < t Initial program 21.1%
Simplified21.2%
[Start]21.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/ [<=]21.2 | \[ \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}}{-1 \cdot \left(\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}\right)} \cdot t
\] |
|---|---|
associate-*r* [=>]1.6 | \[ \frac{\sqrt{2}}{\color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot t\right)\right) \cdot \sqrt{\frac{1 + x}{x - 1}}}} \cdot t
\] |
*-commutative [<=]1.6 | \[ \frac{\sqrt{2}}{\left(-1 \cdot \color{blue}{\left(t \cdot \sqrt{2}\right)}\right) \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
neg-mul-1 [<=]1.6 | \[ \frac{\sqrt{2}}{\color{blue}{\left(-t \cdot \sqrt{2}\right)} \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
distribute-rgt-neg-in [=>]1.6 | \[ \frac{\sqrt{2}}{\color{blue}{\left(t \cdot \left(-\sqrt{2}\right)\right)} \cdot \sqrt{\frac{1 + x}{x - 1}}} \cdot t
\] |
+-commutative [<=]1.6 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{\color{blue}{x + 1}}{x - 1}}} \cdot t
\] |
sub-neg [=>]1.6 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{x + 1}{\color{blue}{x + \left(-1\right)}}}} \cdot t
\] |
metadata-eval [=>]1.6 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \cdot t
\] |
+-commutative [=>]1.6 | \[ \frac{\sqrt{2}}{\left(t \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \cdot t
\] |
Applied egg-rr22.4%
Simplified96.2%
[Start]22.4 | \[ \sqrt{\left(t \cdot t\right) \cdot \frac{2}{\frac{x + 1}{x + -1} \cdot \left(2 \cdot \left(t \cdot t\right)\right)}}
\] |
|---|---|
associate-*r/ [=>]22.5 | \[ \sqrt{\color{blue}{\frac{\left(t \cdot t\right) \cdot 2}{\frac{x + 1}{x + -1} \cdot \left(2 \cdot \left(t \cdot t\right)\right)}}}
\] |
*-commutative [<=]22.5 | \[ \sqrt{\frac{\color{blue}{2 \cdot \left(t \cdot t\right)}}{\frac{x + 1}{x + -1} \cdot \left(2 \cdot \left(t \cdot t\right)\right)}}
\] |
*-commutative [=>]22.5 | \[ \sqrt{\frac{2 \cdot \left(t \cdot t\right)}{\color{blue}{\left(2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x + -1}}}}
\] |
associate-/r* [=>]22.5 | \[ \sqrt{\color{blue}{\frac{\frac{2 \cdot \left(t \cdot t\right)}{2 \cdot \left(t \cdot t\right)}}{\frac{x + 1}{x + -1}}}}
\] |
*-inverses [=>]96.2 | \[ \sqrt{\frac{\color{blue}{1}}{\frac{x + 1}{x + -1}}}
\] |
+-commutative [=>]96.2 | \[ \sqrt{\frac{1}{\frac{x + 1}{\color{blue}{-1 + x}}}}
\] |
Taylor expanded in x around inf 95.1%
Final simplification82.9%
| Alternative 1 | |
|---|---|
| Accuracy | 76.2% |
| Cost | 7504 |
| Alternative 2 | |
|---|---|
| Accuracy | 76.0% |
| Cost | 7376 |
| Alternative 3 | |
|---|---|
| Accuracy | 76.2% |
| Cost | 7376 |
| Alternative 4 | |
|---|---|
| Accuracy | 75.7% |
| Cost | 7312 |
| Alternative 5 | |
|---|---|
| Accuracy | 75.7% |
| Cost | 7312 |
| Alternative 6 | |
|---|---|
| Accuracy | 75.8% |
| Cost | 7248 |
| Alternative 7 | |
|---|---|
| Accuracy | 75.8% |
| Cost | 7248 |
| Alternative 8 | |
|---|---|
| Accuracy | 75.8% |
| Cost | 836 |
| Alternative 9 | |
|---|---|
| Accuracy | 75.9% |
| Cost | 836 |
| Alternative 10 | |
|---|---|
| Accuracy | 75.3% |
| Cost | 452 |
| Alternative 11 | |
|---|---|
| Accuracy | 75.6% |
| Cost | 452 |
| Alternative 12 | |
|---|---|
| Accuracy | 74.9% |
| Cost | 196 |
| Alternative 13 | |
|---|---|
| Accuracy | 38.7% |
| Cost | 64 |
herbie shell --seed 2023152
(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)))))