Average Error: 43.4 → 8.7
Time: 3.2min
Precision: binary64
Cost: 47684
\[\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}
\mathbf{if}\;t \leq -5.2919924128564495 \cdot 10^{+60}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq 4.192030017014753 \cdot 10^{-266}:\\
\;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}} + \sqrt{\frac{1}{2 + \frac{4}{x}}} \cdot \frac{\ell \cdot \ell}{t \cdot x}}\\
\mathbf{elif}\;t \leq 3.478259665751439 \cdot 10^{+54}:\\
\;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(t \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\end{array}\]
\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}
\mathbf{if}\;t \leq -5.2919924128564495 \cdot 10^{+60}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq 4.192030017014753 \cdot 10^{-266}:\\
\;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}} + \sqrt{\frac{1}{2 + \frac{4}{x}}} \cdot \frac{\ell \cdot \ell}{t \cdot x}}\\
\mathbf{elif}\;t \leq 3.478259665751439 \cdot 10^{+54}:\\
\;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(t \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\end{array}(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
(if (<= t -5.2919924128564495e+60)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t 4.192030017014753e-266)
(/
(* (sqrt (sqrt 2.0)) (* t (sqrt (sqrt 2.0))))
(sqrt (+ (* 2.0 (* l (/ l x))) (* (* t t) (+ 2.0 (/ 4.0 x))))))
(if (<= t 7.081498969282516e-185)
(/
(* t (sqrt 2.0))
(+
(* t (sqrt (+ 2.0 (/ 4.0 x))))
(* (sqrt (/ 1.0 (+ 2.0 (/ 4.0 x)))) (/ (* l l) (* t x)))))
(if (<= t 3.478259665751439e+54)
(/
(* (* (cbrt (sqrt 2.0)) (cbrt (sqrt 2.0))) (* t (cbrt (sqrt 2.0))))
(sqrt (+ (* 2.0 (* l (/ l x))) (* (* t t) (+ 2.0 (/ 4.0 x))))))
(/
(* t (sqrt 2.0))
(* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))))))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 tmp;
if (t <= -5.2919924128564495e+60) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
} else if (t <= 4.192030017014753e-266) {
tmp = (sqrt(sqrt(2.0)) * (t * sqrt(sqrt(2.0)))) / sqrt((2.0 * (l * (l / x))) + ((t * t) * (2.0 + (4.0 / x))));
} else if (t <= 7.081498969282516e-185) {
tmp = (t * sqrt(2.0)) / ((t * sqrt(2.0 + (4.0 / x))) + (sqrt(1.0 / (2.0 + (4.0 / x))) * ((l * l) / (t * x))));
} else if (t <= 3.478259665751439e+54) {
tmp = ((cbrt(sqrt(2.0)) * cbrt(sqrt(2.0))) * (t * cbrt(sqrt(2.0)))) / sqrt((2.0 * (l * (l / x))) + ((t * t) * (2.0 + (4.0 / x))));
} else {
tmp = (t * sqrt(2.0)) / (t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
}
return tmp;
}
Try it out
Enter valid numbers for all inputs
Alternatives
| Alternative 1 |
|---|
| Error | 8.7 |
|---|
| Cost | 34114 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -5.2919924128564495 \cdot 10^{+60}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq 4.192030017014753 \cdot 10^{-266}:\\
\;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}} + \sqrt{\frac{1}{2 + \frac{4}{x}}} \cdot \frac{\ell \cdot \ell}{t \cdot x}}\\
\mathbf{elif}\;t \leq 3.478259665751439 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\end{array}\]
| Alternative 2 |
|---|
| Error | 8.7 |
|---|
| Cost | 21891 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -5.2919924128564495 \cdot 10^{+60}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq 4.192030017014753 \cdot 10^{-266}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}} + \sqrt{\frac{1}{2 + \frac{4}{x}}} \cdot \frac{\ell \cdot \ell}{t \cdot x}}\\
\mathbf{elif}\;t \leq 3.478259665751439 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\end{array}\]
| Alternative 3 |
|---|
| Error | 9.2 |
|---|
| Cost | 15684 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -5.2919924128564495 \cdot 10^{+60}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq 5.224886030954151 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 2.2544254585346644 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\end{array}\]
| Alternative 4 |
|---|
| Error | 9.3 |
|---|
| Cost | 15300 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -5.2919924128564495 \cdot 10^{+60}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq 5.224886030954151 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3.478259665751439 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + 2 \cdot \left(t \cdot t\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\end{array}\]
| Alternative 5 |
|---|
| Error | 9.3 |
|---|
| Cost | 15300 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -5.2919924128564495 \cdot 10^{+60}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq 5.224886030954151 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + 2 \cdot \left(t \cdot t\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3.478259665751439 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + 2 \cdot \left(t \cdot t\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\end{array}\]
| Alternative 6 |
|---|
| Error | 9.5 |
|---|
| Cost | 15300 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -1.108092975063467 \cdot 10^{+95}:\\
\;\;\;\;-\sqrt{2} \cdot \sqrt{\frac{0.5}{\frac{x}{x - 1} + \frac{1}{x - 1}}}\\
\mathbf{elif}\;t \leq 5.224886030954151 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + 2 \cdot \left(t \cdot t\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3.478259665751439 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + 2 \cdot \left(t \cdot t\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\end{array}\]
| Alternative 7 |
|---|
| Error | 9.6 |
|---|
| Cost | 15172 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -1.108092975063467 \cdot 10^{+95}:\\
\;\;\;\;-\sqrt{2} \cdot \sqrt{\frac{0.5}{\frac{x}{x - 1} + \frac{1}{x - 1}}}\\
\mathbf{elif}\;t \leq 5.224886030954151 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + 2 \cdot \left(t \cdot t\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3.3511096763505706 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + 2 \cdot \left(t \cdot t\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}\\
\end{array}\]
| Alternative 8 |
|---|
| Error | 11.9 |
|---|
| Cost | 15172 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -7.88324907210378 \cdot 10^{+43}:\\
\;\;\;\;-\sqrt{2} \cdot \sqrt{\frac{0.5}{\frac{x}{x - 1} + \frac{1}{x - 1}}}\\
\mathbf{elif}\;t \leq 5.224886030954151 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(t \cdot t\right) + 2 \cdot \frac{\ell \cdot \ell}{x}}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.3403225210506321 \cdot 10^{+28}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(t \cdot t\right) + 2 \cdot \frac{\ell \cdot \ell}{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}\\
\end{array}\]
| Alternative 9 |
|---|
| Error | 15.3 |
|---|
| Cost | 14916 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -4.826401648043764 \cdot 10^{-173}:\\
\;\;\;\;-\sqrt{2} \cdot \sqrt{\frac{0.5}{\frac{x}{x - 1} + \frac{1}{x - 1}}}\\
\mathbf{elif}\;t \leq 5.224886030954151 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.86238128998016 \cdot 10^{-94}:\\
\;\;\;\;\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1}{2 \cdot \frac{\ell \cdot \ell}{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}\\
\end{array}\]
| Alternative 10 |
|---|
| Error | 15.1 |
|---|
| Cost | 14916 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -4.826401648043764 \cdot 10^{-173}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{2 + \frac{4}{x}}}\\
\mathbf{elif}\;t \leq 5.224886030954151 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.86238128998016 \cdot 10^{-94}:\\
\;\;\;\;\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1}{2 \cdot \frac{\ell \cdot \ell}{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}\\
\end{array}\]
| Alternative 11 |
|---|
| Error | 14.8 |
|---|
| Cost | 14788 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -4.826401648043764 \cdot 10^{-173}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{2 + \frac{4}{x}}}\\
\mathbf{elif}\;t \leq 5.224886030954151 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 2.8307532102252626 \cdot 10^{-96}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}\\
\end{array}\]
| Alternative 12 |
|---|
| Error | 15.0 |
|---|
| Cost | 14788 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -4.826401648043764 \cdot 10^{-173}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 5.224886030954151 \cdot 10^{-231}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.86238128998016 \cdot 10^{-94}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}\\
\end{array}\]
| Alternative 13 |
|---|
| Error | 16.4 |
|---|
| Cost | 14146 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -4.826401648043764 \cdot 10^{-173}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 4.57531098855737 \cdot 10^{-304}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}}}\\
\end{array}\]
| Alternative 14 |
|---|
| Error | 16.6 |
|---|
| Cost | 706 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -4.826401648043764 \cdot 10^{-173}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 4.57531098855737 \cdot 10^{-304}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}\]
| Alternative 15 |
|---|
| Error | 37.4 |
|---|
| Cost | 385 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq 4.57531098855737 \cdot 10^{-304}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}\]
| Alternative 16 |
|---|
| Error | 39.4 |
|---|
| Cost | 64 |
|---|
\[1\]
Error

Time

Derivation
- Split input into 5 regimes
if t < -5.2919924128564495e60
Initial program 45.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}}\]
Taylor expanded around -inf 3.6
\[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{-1 \cdot \left(t \cdot \sqrt{2 \cdot \frac{1}{x - 1} + 2 \cdot \frac{x}{x - 1}}\right)}}\]
Simplified3.6
\[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}}\]
Simplified3.6
\[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}}\]
if -5.2919924128564495e60 < t < 4.19203001701475306e-266
Initial program 42.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}}\]
Taylor expanded around inf 19.1
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2}}{x} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)}}}\]
Simplified19.1
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}}\]
- Using strategy
rm Applied *-un-lft-identity_binary64_7819.1
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{\color{blue}{1 \cdot x}} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\]
Applied times-frac_binary64_8414.9
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \color{blue}{\left(\frac{\ell}{1} \cdot \frac{\ell}{x}\right)} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\]
Simplified14.9
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\ell} \cdot \frac{\ell}{x}\right) + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\]
Taylor expanded around 0 14.9
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \color{blue}{\left(4 \cdot \frac{1}{x} + 2\right) \cdot {t}^{2}}}}\]
Simplified14.9
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \color{blue}{\left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}}\]
- Using strategy
rm Applied add-sqr-sqrt_binary64_10015.0
\[\leadsto \frac{\color{blue}{\left(\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}\right)} \cdot t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\]
Applied associate-*l*_binary64_1914.9
\[\leadsto \frac{\color{blue}{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\]
Simplified14.9
\[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \color{blue}{\left(t \cdot \sqrt{\sqrt{2}}\right)}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\]
Simplified14.9
\[\leadsto \color{blue}{\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}}\]
if 4.19203001701475306e-266 < t < 7.0814989692825159e-185
Initial program 63.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}}\]
Taylor expanded around inf 33.3
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2}}{x} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)}}}\]
Simplified33.3
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}}\]
Taylor expanded around inf 23.7
\[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\sqrt{4 \cdot \frac{1}{x} + 2} \cdot t + \sqrt{\frac{1}{4 \cdot \frac{1}{x} + 2}} \cdot \frac{{\ell}^{2}}{x \cdot t}}}\]
Simplified23.7
\[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2 + \frac{4}{x}} + \sqrt{\frac{1}{2 + \frac{4}{x}}} \cdot \frac{\ell \cdot \ell}{x \cdot t}}}\]
Simplified23.7
\[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{t \cdot \sqrt{2 + \frac{4}{x}} + \sqrt{\frac{1}{2 + \frac{4}{x}}} \cdot \frac{\ell \cdot \ell}{x \cdot t}}}\]
if 7.0814989692825159e-185 < t < 3.4782596657514389e54
Initial program 33.5
\[\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}}\]
Taylor expanded around inf 13.7
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2}}{x} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)}}}\]
Simplified13.7
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}}\]
- Using strategy
rm Applied *-un-lft-identity_binary64_7813.7
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{\color{blue}{1 \cdot x}} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\]
Applied times-frac_binary64_848.3
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \color{blue}{\left(\frac{\ell}{1} \cdot \frac{\ell}{x}\right)} + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\]
Simplified8.3
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\ell} \cdot \frac{\ell}{x}\right) + \left(2 \cdot \left(t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}\right)}}\]
Taylor expanded around 0 8.3
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \color{blue}{\left(4 \cdot \frac{1}{x} + 2\right) \cdot {t}^{2}}}}\]
Simplified8.3
\[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \color{blue}{\left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}}\]
- Using strategy
rm Applied add-cube-cbrt_binary64_1138.3
\[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \sqrt[3]{\sqrt{2}}\right)} \cdot t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\]
Applied associate-*l*_binary64_198.2
\[\leadsto \frac{\color{blue}{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot t\right)}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\]
Simplified8.2
\[\leadsto \frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \color{blue}{\left(t \cdot \sqrt[3]{\sqrt{2}}\right)}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\]
Simplified8.2
\[\leadsto \color{blue}{\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(t \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}}\]
if 3.4782596657514389e54 < t
Initial program 46.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}}\]
Taylor expanded around inf 3.2
\[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2 \cdot \frac{1}{x - 1} + 2 \cdot \frac{x}{x - 1}}}}\]
Simplified3.2
\[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}}\]
Simplified3.2
\[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}}\]
- Recombined 5 regimes into one program.
Final simplification8.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;t \leq -5.2919924128564495 \cdot 10^{+60}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq 4.192030017014753 \cdot 10^{-266}:\\
\;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{elif}\;t \leq 7.081498969282516 \cdot 10^{-185}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2 + \frac{4}{x}} + \sqrt{\frac{1}{2 + \frac{4}{x}}} \cdot \frac{\ell \cdot \ell}{t \cdot x}}\\
\mathbf{elif}\;t \leq 3.478259665751439 \cdot 10^{+54}:\\
\;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(t \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right) + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\end{array}\]
Reproduce
herbie shell --seed 2021065
(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)))))