| Alternative 1 | |
|---|---|
| Accuracy | 86.2% |
| Cost | 28172 |
(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
(*
(sqrt 2.0)
(/
t
(sqrt (* 2.0 (+ (* (* t t) (+ 1.0 (/ 2.0 x))) (/ l (/ x l))))))))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_3 (- t_2)))
(if (<= t -4.6e+142)
t_3
(if (<= t -3.05e-164)
t_1
(if (<= t -1.3e-274)
t_3
(if (<= t 2.85e-269)
(/
t
(exp
(*
0.5
(+
(+ (/ 1.0 x) (log (* l (* (+ l l) 0.5))))
(- (/ (/ 0.5 x) x) (log x))))))
(if (<= t 2.1e-207) 1.0 (if (<= t 3.6e+100) t_1 t_2))))))))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 = sqrt(2.0) * (t / sqrt((2.0 * (((t * t) * (1.0 + (2.0 / x))) + (l / (x / l))))));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double t_3 = -t_2;
double tmp;
if (t <= -4.6e+142) {
tmp = t_3;
} else if (t <= -3.05e-164) {
tmp = t_1;
} else if (t <= -1.3e-274) {
tmp = t_3;
} else if (t <= 2.85e-269) {
tmp = t / exp((0.5 * (((1.0 / x) + log((l * ((l + l) * 0.5)))) + (((0.5 / x) / x) - log(x)))));
} else if (t <= 2.1e-207) {
tmp = 1.0;
} else if (t <= 3.6e+100) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = sqrt(2.0d0) * (t / sqrt((2.0d0 * (((t * t) * (1.0d0 + (2.0d0 / x))) + (l / (x / l))))))
t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
t_3 = -t_2
if (t <= (-4.6d+142)) then
tmp = t_3
else if (t <= (-3.05d-164)) then
tmp = t_1
else if (t <= (-1.3d-274)) then
tmp = t_3
else if (t <= 2.85d-269) then
tmp = t / exp((0.5d0 * (((1.0d0 / x) + log((l * ((l + l) * 0.5d0)))) + (((0.5d0 / x) / x) - log(x)))))
else if (t <= 2.1d-207) then
tmp = 1.0d0
else if (t <= 3.6d+100) then
tmp = t_1
else
tmp = t_2
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 = Math.sqrt(2.0) * (t / Math.sqrt((2.0 * (((t * t) * (1.0 + (2.0 / x))) + (l / (x / l))))));
double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double t_3 = -t_2;
double tmp;
if (t <= -4.6e+142) {
tmp = t_3;
} else if (t <= -3.05e-164) {
tmp = t_1;
} else if (t <= -1.3e-274) {
tmp = t_3;
} else if (t <= 2.85e-269) {
tmp = t / Math.exp((0.5 * (((1.0 / x) + Math.log((l * ((l + l) * 0.5)))) + (((0.5 / x) / x) - Math.log(x)))));
} else if (t <= 2.1e-207) {
tmp = 1.0;
} else if (t <= 3.6e+100) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = math.sqrt(2.0) * (t / math.sqrt((2.0 * (((t * t) * (1.0 + (2.0 / x))) + (l / (x / l)))))) t_2 = math.sqrt(((x + -1.0) / (x + 1.0))) t_3 = -t_2 tmp = 0 if t <= -4.6e+142: tmp = t_3 elif t <= -3.05e-164: tmp = t_1 elif t <= -1.3e-274: tmp = t_3 elif t <= 2.85e-269: tmp = t / math.exp((0.5 * (((1.0 / x) + math.log((l * ((l + l) * 0.5)))) + (((0.5 / x) / x) - math.log(x))))) elif t <= 2.1e-207: tmp = 1.0 elif t <= 3.6e+100: tmp = t_1 else: tmp = t_2 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(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))))))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_3 = Float64(-t_2) tmp = 0.0 if (t <= -4.6e+142) tmp = t_3; elseif (t <= -3.05e-164) tmp = t_1; elseif (t <= -1.3e-274) tmp = t_3; elseif (t <= 2.85e-269) tmp = Float64(t / exp(Float64(0.5 * Float64(Float64(Float64(1.0 / x) + log(Float64(l * Float64(Float64(l + l) * 0.5)))) + Float64(Float64(Float64(0.5 / x) / x) - log(x)))))); elseif (t <= 2.1e-207) tmp = 1.0; elseif (t <= 3.6e+100) tmp = t_1; else tmp = t_2; 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 = sqrt(2.0) * (t / sqrt((2.0 * (((t * t) * (1.0 + (2.0 / x))) + (l / (x / l)))))); t_2 = sqrt(((x + -1.0) / (x + 1.0))); t_3 = -t_2; tmp = 0.0; if (t <= -4.6e+142) tmp = t_3; elseif (t <= -3.05e-164) tmp = t_1; elseif (t <= -1.3e-274) tmp = t_3; elseif (t <= 2.85e-269) tmp = t / exp((0.5 * (((1.0 / x) + log((l * ((l + l) * 0.5)))) + (((0.5 / x) / x) - log(x))))); elseif (t <= 2.1e-207) tmp = 1.0; elseif (t <= 3.6e+100) tmp = t_1; else tmp = t_2; 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[(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]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = (-t$95$2)}, If[LessEqual[t, -4.6e+142], t$95$3, If[LessEqual[t, -3.05e-164], t$95$1, If[LessEqual[t, -1.3e-274], t$95$3, If[LessEqual[t, 2.85e-269], N[(t / N[Exp[N[(0.5 * N[(N[(N[(1.0 / x), $MachinePrecision] + N[Log[N[(l * N[(N[(l + l), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-207], 1.0, If[LessEqual[t, 3.6e+100], t$95$1, t$95$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}}
\begin{array}{l}
t_1 := \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)}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := -t_2\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{+142}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -3.05 \cdot 10^{-164}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-274}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 2.85 \cdot 10^{-269}:\\
\;\;\;\;\frac{t}{e^{0.5 \cdot \left(\left(\frac{1}{x} + \log \left(\ell \cdot \left(\left(\ell + \ell\right) \cdot 0.5\right)\right)\right) + \left(\frac{\frac{0.5}{x}}{x} - \log x\right)\right)}}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-207}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
Results
if t < -4.60000000000000004e142 or -3.05000000000000007e-164 < t < -1.3e-274Initial program 6.0%
Simplified6.0%
[Start]6.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/ [<=]6.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 [=>]6.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 [=>]6.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
\] |
Applied egg-rr6.0%
Taylor expanded in t around -inf 82.1%
Simplified82.1%
[Start]82.1 | \[ -1 \cdot \sqrt{\frac{x - 1}{1 + x}}
\] |
|---|---|
mul-1-neg [=>]82.1 | \[ \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}}
\] |
sub-neg [=>]82.1 | \[ -\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}}
\] |
metadata-eval [=>]82.1 | \[ -\sqrt{\frac{x + \color{blue}{-1}}{1 + x}}
\] |
+-commutative [=>]82.1 | \[ -\sqrt{\frac{x + -1}{\color{blue}{x + 1}}}
\] |
if -4.60000000000000004e142 < t < -3.05000000000000007e-164 or 2.10000000000000003e-207 < t < 3.6e100Initial program 55.1%
Simplified46.0%
[Start]55.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-*r/ [<=]55.0 | \[ \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/ [=>]42.1 | \[ \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/ [<=]45.2 | \[ \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 [<=]45.2 | \[ \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* [<=]45.2 | \[ \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 [<=]45.2 | \[ \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* [=>]45.2 | \[ \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 [<=]45.2 | \[ \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 [=>]46.0 | \[ \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 80.4%
Simplified80.4%
[Start]80.4 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}
\] |
|---|---|
distribute-lft-out [=>]80.4 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{\color{blue}{2 \cdot \left(\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}}}
\] |
+-commutative [=>]80.4 | \[ \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\frac{\color{blue}{2 \cdot {t}^{2} + {\ell}^{2}}}{x} + {t}^{2}\right)}}
\] |
unpow2 [=>]80.4 | \[ \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 [<=]80.4 | \[ \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 [=>]80.4 | \[ \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 [=>]80.4 | \[ \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 80.4%
Simplified88.7%
[Start]80.4 | \[ \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 [=>]80.4 | \[ \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 [=>]80.4 | \[ \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/ [=>]80.4 | \[ \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 [=>]80.4 | \[ \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 [=>]80.4 | \[ \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* [=>]88.7 | \[ \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.3e-274 < t < 2.84999999999999985e-269Initial program 1.7%
Simplified1.7%
[Start]1.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/ [<=]1.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}
\] |
+-commutative [=>]1.7 | \[ \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 [=>]1.7 | \[ \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-rr1.7%
Taylor expanded in t around 0 1.7%
Simplified1.7%
[Start]1.7 | \[ \frac{t}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot {\ell}^{2} - \ell \cdot \ell}{2}}}
\] |
|---|---|
unpow2 [=>]1.7 | \[ \frac{t}{\sqrt{\frac{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell\right)} - \ell \cdot \ell}{2}}}
\] |
Applied egg-rr4.5%
Taylor expanded in x around inf 63.2%
Simplified63.2%
[Start]63.2 | \[ \frac{t}{e^{\left(\log \left(\frac{1}{x}\right) + \left(0.5 \cdot \frac{1}{{x}^{2}} + \left(\log \left(0.5 \cdot \left(\ell \cdot \left(\ell - -1 \cdot \ell\right)\right)\right) + \frac{1}{x}\right)\right)\right) \cdot 0.5}}
\] |
|---|---|
associate-+r+ [=>]63.2 | \[ \frac{t}{e^{\color{blue}{\left(\left(\log \left(\frac{1}{x}\right) + 0.5 \cdot \frac{1}{{x}^{2}}\right) + \left(\log \left(0.5 \cdot \left(\ell \cdot \left(\ell - -1 \cdot \ell\right)\right)\right) + \frac{1}{x}\right)\right)} \cdot 0.5}}
\] |
+-commutative [=>]63.2 | \[ \frac{t}{e^{\color{blue}{\left(\left(\log \left(0.5 \cdot \left(\ell \cdot \left(\ell - -1 \cdot \ell\right)\right)\right) + \frac{1}{x}\right) + \left(\log \left(\frac{1}{x}\right) + 0.5 \cdot \frac{1}{{x}^{2}}\right)\right)} \cdot 0.5}}
\] |
+-commutative [=>]63.2 | \[ \frac{t}{e^{\left(\color{blue}{\left(\frac{1}{x} + \log \left(0.5 \cdot \left(\ell \cdot \left(\ell - -1 \cdot \ell\right)\right)\right)\right)} + \left(\log \left(\frac{1}{x}\right) + 0.5 \cdot \frac{1}{{x}^{2}}\right)\right) \cdot 0.5}}
\] |
*-commutative [=>]63.2 | \[ \frac{t}{e^{\left(\left(\frac{1}{x} + \log \color{blue}{\left(\left(\ell \cdot \left(\ell - -1 \cdot \ell\right)\right) \cdot 0.5\right)}\right) + \left(\log \left(\frac{1}{x}\right) + 0.5 \cdot \frac{1}{{x}^{2}}\right)\right) \cdot 0.5}}
\] |
associate-*l* [=>]63.2 | \[ \frac{t}{e^{\left(\left(\frac{1}{x} + \log \color{blue}{\left(\ell \cdot \left(\left(\ell - -1 \cdot \ell\right) \cdot 0.5\right)\right)}\right) + \left(\log \left(\frac{1}{x}\right) + 0.5 \cdot \frac{1}{{x}^{2}}\right)\right) \cdot 0.5}}
\] |
mul-1-neg [=>]63.2 | \[ \frac{t}{e^{\left(\left(\frac{1}{x} + \log \left(\ell \cdot \left(\left(\ell - \color{blue}{\left(-\ell\right)}\right) \cdot 0.5\right)\right)\right) + \left(\log \left(\frac{1}{x}\right) + 0.5 \cdot \frac{1}{{x}^{2}}\right)\right) \cdot 0.5}}
\] |
log-rec [=>]63.2 | \[ \frac{t}{e^{\left(\left(\frac{1}{x} + \log \left(\ell \cdot \left(\left(\ell - \left(-\ell\right)\right) \cdot 0.5\right)\right)\right) + \left(\color{blue}{\left(-\log x\right)} + 0.5 \cdot \frac{1}{{x}^{2}}\right)\right) \cdot 0.5}}
\] |
associate-*r/ [=>]63.2 | \[ \frac{t}{e^{\left(\left(\frac{1}{x} + \log \left(\ell \cdot \left(\left(\ell - \left(-\ell\right)\right) \cdot 0.5\right)\right)\right) + \left(\left(-\log x\right) + \color{blue}{\frac{0.5 \cdot 1}{{x}^{2}}}\right)\right) \cdot 0.5}}
\] |
metadata-eval [=>]63.2 | \[ \frac{t}{e^{\left(\left(\frac{1}{x} + \log \left(\ell \cdot \left(\left(\ell - \left(-\ell\right)\right) \cdot 0.5\right)\right)\right) + \left(\left(-\log x\right) + \frac{\color{blue}{0.5}}{{x}^{2}}\right)\right) \cdot 0.5}}
\] |
unpow2 [=>]63.2 | \[ \frac{t}{e^{\left(\left(\frac{1}{x} + \log \left(\ell \cdot \left(\left(\ell - \left(-\ell\right)\right) \cdot 0.5\right)\right)\right) + \left(\left(-\log x\right) + \frac{0.5}{\color{blue}{x \cdot x}}\right)\right) \cdot 0.5}}
\] |
associate-/r* [=>]63.2 | \[ \frac{t}{e^{\left(\left(\frac{1}{x} + \log \left(\ell \cdot \left(\left(\ell - \left(-\ell\right)\right) \cdot 0.5\right)\right)\right) + \left(\left(-\log x\right) + \color{blue}{\frac{\frac{0.5}{x}}{x}}\right)\right) \cdot 0.5}}
\] |
if 2.84999999999999985e-269 < t < 2.10000000000000003e-207Initial program 2.4%
Simplified2.4%
[Start]2.4 | \[ \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}}
\] |
|---|---|
*-lft-identity [<=]2.4 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 \cdot \frac{x + 1}{x - 1}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\] |
*-lft-identity [=>]2.4 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{x + 1}{x - 1}} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\] |
sub-neg [=>]2.4 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{\color{blue}{x + \left(-1\right)}} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\] |
metadata-eval [=>]2.4 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x + \color{blue}{-1}} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\] |
fma-def [=>]2.4 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}}
\] |
Taylor expanded in x around inf 39.1%
Applied egg-rr39.6%
if 3.6e100 < t Initial program 19.4%
Simplified19.4%
[Start]19.4 | \[ \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/ [<=]19.4 | \[ \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 [=>]19.4 | \[ \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 [=>]19.4 | \[ \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-rr19.5%
Taylor expanded in t around inf 96.5%
Final simplification85.8%
| Alternative 1 | |
|---|---|
| Accuracy | 86.2% |
| Cost | 28172 |
| Alternative 2 | |
|---|---|
| Accuracy | 85.2% |
| Cost | 14936 |
| Alternative 3 | |
|---|---|
| Accuracy | 81.4% |
| Cost | 14552 |
| Alternative 4 | |
|---|---|
| Accuracy | 46.0% |
| Cost | 7244 |
| Alternative 5 | |
|---|---|
| Accuracy | 44.9% |
| Cost | 7180 |
| Alternative 6 | |
|---|---|
| Accuracy | 45.3% |
| Cost | 7180 |
| Alternative 7 | |
|---|---|
| Accuracy | 45.4% |
| Cost | 7180 |
| Alternative 8 | |
|---|---|
| Accuracy | 46.6% |
| Cost | 7112 |
| Alternative 9 | |
|---|---|
| Accuracy | 77.9% |
| Cost | 7112 |
| Alternative 10 | |
|---|---|
| Accuracy | 48.0% |
| Cost | 6980 |
| Alternative 11 | |
|---|---|
| Accuracy | 44.6% |
| Cost | 6852 |
| Alternative 12 | |
|---|---|
| Accuracy | 45.4% |
| Cost | 6852 |
| Alternative 13 | |
|---|---|
| Accuracy | 45.4% |
| Cost | 6852 |
| Alternative 14 | |
|---|---|
| Accuracy | 38.8% |
| Cost | 64 |
herbie shell --seed 2023133
(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)))))