\[ \begin{array}{c}[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \end{array} \]
\[\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right)
\]
↓
\[\begin{array}{l}
t_1 := \sqrt{1 + y}\\
t_2 := \sqrt{z + 1}\\
t_3 := \sqrt{1 + t} - \sqrt{t}\\
t_4 := \sqrt{x + 1}\\
\mathbf{if}\;z \leq 3.6634638227101813 \cdot 10^{+28}:\\
\;\;\;\;\left(\left(\left(t_4 - \sqrt{x}\right) + \left(t_1 - \sqrt{y}\right)\right) + \frac{1}{t_2 + \sqrt{z}}\right) + t_3\\
\mathbf{else}:\\
\;\;\;\;t_3 + \left(\left(\frac{1}{{\left(x + 1\right)}^{1.5} + {x}^{1.5}} \cdot \left(\left(x + \left(x + 1\right)\right) - \sqrt{x} \cdot t_4\right) + \frac{1 + \left(y - y\right)}{\sqrt{y} + t_1}\right) + \left(t_2 - \sqrt{z}\right)\right)\\
\end{array}
\]
(FPCore (x y z t)
:precision binary64
(+
(+
(+ (- (sqrt (+ x 1.0)) (sqrt x)) (- (sqrt (+ y 1.0)) (sqrt y)))
(- (sqrt (+ z 1.0)) (sqrt z)))
(- (sqrt (+ t 1.0)) (sqrt t))))
↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ 1.0 y)))
(t_2 (sqrt (+ z 1.0)))
(t_3 (- (sqrt (+ 1.0 t)) (sqrt t)))
(t_4 (sqrt (+ x 1.0))))
(if (<= z 3.6634638227101813e+28)
(+ (+ (+ (- t_4 (sqrt x)) (- t_1 (sqrt y))) (/ 1.0 (+ t_2 (sqrt z)))) t_3)
(+
t_3
(+
(+
(*
(/ 1.0 (+ (pow (+ x 1.0) 1.5) (pow x 1.5)))
(- (+ x (+ x 1.0)) (* (sqrt x) t_4)))
(/ (+ 1.0 (- y y)) (+ (sqrt y) t_1)))
(- t_2 (sqrt z)))))))double code(double x, double y, double z, double t) {
return (((sqrt((x + 1.0)) - sqrt(x)) + (sqrt((y + 1.0)) - sqrt(y))) + (sqrt((z + 1.0)) - sqrt(z))) + (sqrt((t + 1.0)) - sqrt(t));
}
↓
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + y));
double t_2 = sqrt((z + 1.0));
double t_3 = sqrt((1.0 + t)) - sqrt(t);
double t_4 = sqrt((x + 1.0));
double tmp;
if (z <= 3.6634638227101813e+28) {
tmp = (((t_4 - sqrt(x)) + (t_1 - sqrt(y))) + (1.0 / (t_2 + sqrt(z)))) + t_3;
} else {
tmp = t_3 + ((((1.0 / (pow((x + 1.0), 1.5) + pow(x, 1.5))) * ((x + (x + 1.0)) - (sqrt(x) * t_4))) + ((1.0 + (y - y)) / (sqrt(y) + t_1))) + (t_2 - sqrt(z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((sqrt((x + 1.0d0)) - sqrt(x)) + (sqrt((y + 1.0d0)) - sqrt(y))) + (sqrt((z + 1.0d0)) - sqrt(z))) + (sqrt((t + 1.0d0)) - sqrt(t))
end function
↓
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = sqrt((1.0d0 + y))
t_2 = sqrt((z + 1.0d0))
t_3 = sqrt((1.0d0 + t)) - sqrt(t)
t_4 = sqrt((x + 1.0d0))
if (z <= 3.6634638227101813d+28) then
tmp = (((t_4 - sqrt(x)) + (t_1 - sqrt(y))) + (1.0d0 / (t_2 + sqrt(z)))) + t_3
else
tmp = t_3 + ((((1.0d0 / (((x + 1.0d0) ** 1.5d0) + (x ** 1.5d0))) * ((x + (x + 1.0d0)) - (sqrt(x) * t_4))) + ((1.0d0 + (y - y)) / (sqrt(y) + t_1))) + (t_2 - sqrt(z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
return (((Math.sqrt((x + 1.0)) - Math.sqrt(x)) + (Math.sqrt((y + 1.0)) - Math.sqrt(y))) + (Math.sqrt((z + 1.0)) - Math.sqrt(z))) + (Math.sqrt((t + 1.0)) - Math.sqrt(t));
}
↓
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + y));
double t_2 = Math.sqrt((z + 1.0));
double t_3 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double t_4 = Math.sqrt((x + 1.0));
double tmp;
if (z <= 3.6634638227101813e+28) {
tmp = (((t_4 - Math.sqrt(x)) + (t_1 - Math.sqrt(y))) + (1.0 / (t_2 + Math.sqrt(z)))) + t_3;
} else {
tmp = t_3 + ((((1.0 / (Math.pow((x + 1.0), 1.5) + Math.pow(x, 1.5))) * ((x + (x + 1.0)) - (Math.sqrt(x) * t_4))) + ((1.0 + (y - y)) / (Math.sqrt(y) + t_1))) + (t_2 - Math.sqrt(z)));
}
return tmp;
}
def code(x, y, z, t):
return (((math.sqrt((x + 1.0)) - math.sqrt(x)) + (math.sqrt((y + 1.0)) - math.sqrt(y))) + (math.sqrt((z + 1.0)) - math.sqrt(z))) + (math.sqrt((t + 1.0)) - math.sqrt(t))
↓
def code(x, y, z, t):
t_1 = math.sqrt((1.0 + y))
t_2 = math.sqrt((z + 1.0))
t_3 = math.sqrt((1.0 + t)) - math.sqrt(t)
t_4 = math.sqrt((x + 1.0))
tmp = 0
if z <= 3.6634638227101813e+28:
tmp = (((t_4 - math.sqrt(x)) + (t_1 - math.sqrt(y))) + (1.0 / (t_2 + math.sqrt(z)))) + t_3
else:
tmp = t_3 + ((((1.0 / (math.pow((x + 1.0), 1.5) + math.pow(x, 1.5))) * ((x + (x + 1.0)) - (math.sqrt(x) * t_4))) + ((1.0 + (y - y)) / (math.sqrt(y) + t_1))) + (t_2 - math.sqrt(z)))
return tmp
function code(x, y, z, t)
return Float64(Float64(Float64(Float64(sqrt(Float64(x + 1.0)) - sqrt(x)) + Float64(sqrt(Float64(y + 1.0)) - sqrt(y))) + Float64(sqrt(Float64(z + 1.0)) - sqrt(z))) + Float64(sqrt(Float64(t + 1.0)) - sqrt(t)))
end
↓
function code(x, y, z, t)
t_1 = sqrt(Float64(1.0 + y))
t_2 = sqrt(Float64(z + 1.0))
t_3 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t))
t_4 = sqrt(Float64(x + 1.0))
tmp = 0.0
if (z <= 3.6634638227101813e+28)
tmp = Float64(Float64(Float64(Float64(t_4 - sqrt(x)) + Float64(t_1 - sqrt(y))) + Float64(1.0 / Float64(t_2 + sqrt(z)))) + t_3);
else
tmp = Float64(t_3 + Float64(Float64(Float64(Float64(1.0 / Float64((Float64(x + 1.0) ^ 1.5) + (x ^ 1.5))) * Float64(Float64(x + Float64(x + 1.0)) - Float64(sqrt(x) * t_4))) + Float64(Float64(1.0 + Float64(y - y)) / Float64(sqrt(y) + t_1))) + Float64(t_2 - sqrt(z))));
end
return tmp
end
function tmp = code(x, y, z, t)
tmp = (((sqrt((x + 1.0)) - sqrt(x)) + (sqrt((y + 1.0)) - sqrt(y))) + (sqrt((z + 1.0)) - sqrt(z))) + (sqrt((t + 1.0)) - sqrt(t));
end
↓
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + y));
t_2 = sqrt((z + 1.0));
t_3 = sqrt((1.0 + t)) - sqrt(t);
t_4 = sqrt((x + 1.0));
tmp = 0.0;
if (z <= 3.6634638227101813e+28)
tmp = (((t_4 - sqrt(x)) + (t_1 - sqrt(y))) + (1.0 / (t_2 + sqrt(z)))) + t_3;
else
tmp = t_3 + ((((1.0 / (((x + 1.0) ^ 1.5) + (x ^ 1.5))) * ((x + (x + 1.0)) - (sqrt(x) * t_4))) + ((1.0 + (y - y)) / (sqrt(y) + t_1))) + (t_2 - sqrt(z)));
end
tmp_2 = tmp;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(z + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(z + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, 3.6634638227101813e+28], N[(N[(N[(N[(t$95$4 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$2 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], N[(t$95$3 + N[(N[(N[(N[(1.0 / N[(N[Power[N[(x + 1.0), $MachinePrecision], 1.5], $MachinePrecision] + N[Power[x, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 + N[(y - y), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[y], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right)
↓
\begin{array}{l}
t_1 := \sqrt{1 + y}\\
t_2 := \sqrt{z + 1}\\
t_3 := \sqrt{1 + t} - \sqrt{t}\\
t_4 := \sqrt{x + 1}\\
\mathbf{if}\;z \leq 3.6634638227101813 \cdot 10^{+28}:\\
\;\;\;\;\left(\left(\left(t_4 - \sqrt{x}\right) + \left(t_1 - \sqrt{y}\right)\right) + \frac{1}{t_2 + \sqrt{z}}\right) + t_3\\
\mathbf{else}:\\
\;\;\;\;t_3 + \left(\left(\frac{1}{{\left(x + 1\right)}^{1.5} + {x}^{1.5}} \cdot \left(\left(x + \left(x + 1\right)\right) - \sqrt{x} \cdot t_4\right) + \frac{1 + \left(y - y\right)}{\sqrt{y} + t_1}\right) + \left(t_2 - \sqrt{z}\right)\right)\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 2.3 |
|---|
| Cost | 79556 |
|---|
\[\begin{array}{l}
t_1 := \sqrt{z + 1} - \sqrt{z}\\
t_2 := \sqrt{x + 1}\\
t_3 := \sqrt{1 + y}\\
\mathbf{if}\;\left(\left(t_2 - \sqrt{x}\right) + \left(t_3 - \sqrt{y}\right)\right) + t_1 \leq 1:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + t_2}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(t_1 + \left(1 + \frac{1 + \left(y - y\right)}{\sqrt{y} + t_3}\right)\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 1.5 |
|---|
| Cost | 66628 |
|---|
\[\begin{array}{l}
t_1 := \sqrt{x + 1}\\
t_2 := t_1 - \sqrt{x}\\
\mathbf{if}\;t_2 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + t_1}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(t_2 + \frac{1 + \left(y - y\right)}{\sqrt{y} + \sqrt{1 + y}}\right) + \frac{z + \left(1 - z\right)}{\sqrt{z + 1} + \sqrt{z}}\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.5 |
|---|
| Cost | 53572 |
|---|
\[\begin{array}{l}
t_1 := \sqrt{1 + y}\\
t_2 := \sqrt{z + 1}\\
t_3 := \sqrt{1 + t} - \sqrt{t}\\
t_4 := \sqrt{x + 1}\\
\mathbf{if}\;z \leq 3.6634638227101813 \cdot 10^{+28}:\\
\;\;\;\;\left(\left(\left(t_4 - \sqrt{x}\right) + \left(t_1 - \sqrt{y}\right)\right) + \frac{1}{t_2 + \sqrt{z}}\right) + t_3\\
\mathbf{else}:\\
\;\;\;\;t_3 + \left(\left(t_2 - \sqrt{z}\right) + \left(\frac{1 + \left(y - y\right)}{\sqrt{y} + t_1} + \frac{1 + \left(x - x\right)}{\sqrt{x} + t_4}\right)\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 2.3 |
|---|
| Cost | 53188 |
|---|
\[\begin{array}{l}
t_1 := \sqrt{1 + y} - \sqrt{y}\\
\mathbf{if}\;t_1 \leq 10^{-7}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + \sqrt{x + 1}}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{z + \left(1 - z\right)}{\sqrt{z + 1} + \sqrt{z}} + \left(1 + t_1\right)\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.8 |
|---|
| Cost | 53188 |
|---|
\[\begin{array}{l}
t_1 := \sqrt{1 + y} - \sqrt{y}\\
t_2 := \sqrt{z + 1}\\
t_3 := \sqrt{1 + t} - \sqrt{t}\\
t_4 := \sqrt{x + 1}\\
\mathbf{if}\;x \leq 2522458.00101378:\\
\;\;\;\;\left(\left(\left(t_4 - \sqrt{x}\right) + t_1\right) + \frac{1}{t_2 + \sqrt{z}}\right) + t_3\\
\mathbf{else}:\\
\;\;\;\;t_3 + \left(\left(t_2 - \sqrt{z}\right) + \left(t_1 + \frac{1 + \left(x - x\right)}{\sqrt{x} + t_4}\right)\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 1.8 |
|---|
| Cost | 52932 |
|---|
\[\begin{array}{l}
t_1 := \sqrt{x + 1}\\
\mathbf{if}\;x \leq 2522458.00101378:\\
\;\;\;\;\left(\left(\left(t_1 - \sqrt{x}\right) + \left(\sqrt{1 + y} - \sqrt{y}\right)\right) + \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + t_1}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 2.7 |
|---|
| Cost | 39748 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 222920785924.61026:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(\sqrt{z + 1} - \sqrt{z}\right) + \left(1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + \sqrt{x + 1}}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 6.8 |
|---|
| Cost | 26568 |
|---|
\[\begin{array}{l}
t_1 := \sqrt{x + 1}\\
\mathbf{if}\;y \leq 1.0114918899052811 \cdot 10^{-22}:\\
\;\;\;\;\left(\sqrt{z + 1} - \sqrt{z}\right) + 2\\
\mathbf{elif}\;y \leq 4.088889138972062 \cdot 10^{+51}:\\
\;\;\;\;\left(\left(\sqrt{1 + y} - \sqrt{y}\right) + t_1\right) - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + t_1}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 3.1 |
|---|
| Cost | 26568 |
|---|
\[\begin{array}{l}
t_1 := \sqrt{x + 1}\\
\mathbf{if}\;y \leq 1.0114918899052811 \cdot 10^{-22}:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(\sqrt{z + 1} - \sqrt{z}\right) + 2\right)\\
\mathbf{elif}\;y \leq 4.088889138972062 \cdot 10^{+51}:\\
\;\;\;\;\left(\left(\sqrt{1 + y} - \sqrt{y}\right) + t_1\right) - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + t_1}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 6.9 |
|---|
| Cost | 13768 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.0114918899052811 \cdot 10^{-22}:\\
\;\;\;\;\left(\sqrt{z + 1} - \sqrt{z}\right) + 2\\
\mathbf{elif}\;y \leq 222920785924.61026:\\
\;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + \sqrt{x + 1}}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 12.1 |
|---|
| Cost | 13380 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 0.12266591364158563:\\
\;\;\;\;\left(\sqrt{z + 1} - \sqrt{z}\right) + 2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x + 1} - \sqrt{x}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 10.4 |
|---|
| Cost | 13380 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq 378797530030433.6:\\
\;\;\;\;\left(\sqrt{z + 1} - \sqrt{z}\right) + 2\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 41.2 |
|---|
| Cost | 13120 |
|---|
\[\sqrt{x + 1} - \sqrt{x}
\]
| Alternative 14 |
|---|
| Error | 41.9 |
|---|
| Cost | 64 |
|---|
\[1
\]