Main:z from

Percentage Accurate: 91.5% → 99.5%
Time: 38.9s
Alternatives: 25
Speedup: 0.9×

Specification

?
\[\begin{array}{l} \\ \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) \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))))
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));
}
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
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));
}
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))
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 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
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]
\begin{array}{l}

\\
\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)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 25 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 91.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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) \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))))
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));
}
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
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));
}
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))
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 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
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]
\begin{array}{l}

\\
\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)
\end{array}

Alternative 1: 99.5% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{y + 1}\\ t_2 := \sqrt{1 + t}\\ t_3 := \sqrt{1 + x}\\ t_4 := \sqrt{x} + t\_3\\ t_5 := \sqrt{y} + t\_1\\ \mathbf{if}\;z \leq 62000000:\\ \;\;\;\;\left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(t\_1 - \sqrt{y}\right) + \left(t\_3 - \sqrt{x}\right)\right)\right) + \frac{\left(1 + t\right) - t}{t\_2 + \sqrt{t}}\\ \mathbf{else}:\\ \;\;\;\;\left(t\_2 - \sqrt{t}\right) + \left(\frac{t\_5 + t\_4}{t\_5 \cdot t\_4} + 0.5 \cdot \sqrt{\frac{1}{z}}\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (sqrt (+ y 1.0)))
        (t_2 (sqrt (+ 1.0 t)))
        (t_3 (sqrt (+ 1.0 x)))
        (t_4 (+ (sqrt x) t_3))
        (t_5 (+ (sqrt y) t_1)))
   (if (<= z 62000000.0)
     (+
      (+ (- (sqrt (+ 1.0 z)) (sqrt z)) (+ (- t_1 (sqrt y)) (- t_3 (sqrt x))))
      (/ (- (+ 1.0 t) t) (+ t_2 (sqrt t))))
     (+
      (- t_2 (sqrt t))
      (+ (/ (+ t_5 t_4) (* t_5 t_4)) (* 0.5 (sqrt (/ 1.0 z))))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = sqrt((y + 1.0));
	double t_2 = sqrt((1.0 + t));
	double t_3 = sqrt((1.0 + x));
	double t_4 = sqrt(x) + t_3;
	double t_5 = sqrt(y) + t_1;
	double tmp;
	if (z <= 62000000.0) {
		tmp = ((sqrt((1.0 + z)) - sqrt(z)) + ((t_1 - sqrt(y)) + (t_3 - sqrt(x)))) + (((1.0 + t) - t) / (t_2 + sqrt(t)));
	} else {
		tmp = (t_2 - sqrt(t)) + (((t_5 + t_4) / (t_5 * t_4)) + (0.5 * sqrt((1.0 / z))));
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: t_5
    real(8) :: tmp
    t_1 = sqrt((y + 1.0d0))
    t_2 = sqrt((1.0d0 + t))
    t_3 = sqrt((1.0d0 + x))
    t_4 = sqrt(x) + t_3
    t_5 = sqrt(y) + t_1
    if (z <= 62000000.0d0) then
        tmp = ((sqrt((1.0d0 + z)) - sqrt(z)) + ((t_1 - sqrt(y)) + (t_3 - sqrt(x)))) + (((1.0d0 + t) - t) / (t_2 + sqrt(t)))
    else
        tmp = (t_2 - sqrt(t)) + (((t_5 + t_4) / (t_5 * t_4)) + (0.5d0 * sqrt((1.0d0 / z))))
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = Math.sqrt((y + 1.0));
	double t_2 = Math.sqrt((1.0 + t));
	double t_3 = Math.sqrt((1.0 + x));
	double t_4 = Math.sqrt(x) + t_3;
	double t_5 = Math.sqrt(y) + t_1;
	double tmp;
	if (z <= 62000000.0) {
		tmp = ((Math.sqrt((1.0 + z)) - Math.sqrt(z)) + ((t_1 - Math.sqrt(y)) + (t_3 - Math.sqrt(x)))) + (((1.0 + t) - t) / (t_2 + Math.sqrt(t)));
	} else {
		tmp = (t_2 - Math.sqrt(t)) + (((t_5 + t_4) / (t_5 * t_4)) + (0.5 * Math.sqrt((1.0 / z))));
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = math.sqrt((y + 1.0))
	t_2 = math.sqrt((1.0 + t))
	t_3 = math.sqrt((1.0 + x))
	t_4 = math.sqrt(x) + t_3
	t_5 = math.sqrt(y) + t_1
	tmp = 0
	if z <= 62000000.0:
		tmp = ((math.sqrt((1.0 + z)) - math.sqrt(z)) + ((t_1 - math.sqrt(y)) + (t_3 - math.sqrt(x)))) + (((1.0 + t) - t) / (t_2 + math.sqrt(t)))
	else:
		tmp = (t_2 - math.sqrt(t)) + (((t_5 + t_4) / (t_5 * t_4)) + (0.5 * math.sqrt((1.0 / z))))
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = sqrt(Float64(y + 1.0))
	t_2 = sqrt(Float64(1.0 + t))
	t_3 = sqrt(Float64(1.0 + x))
	t_4 = Float64(sqrt(x) + t_3)
	t_5 = Float64(sqrt(y) + t_1)
	tmp = 0.0
	if (z <= 62000000.0)
		tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(Float64(t_1 - sqrt(y)) + Float64(t_3 - sqrt(x)))) + Float64(Float64(Float64(1.0 + t) - t) / Float64(t_2 + sqrt(t))));
	else
		tmp = Float64(Float64(t_2 - sqrt(t)) + Float64(Float64(Float64(t_5 + t_4) / Float64(t_5 * t_4)) + Float64(0.5 * sqrt(Float64(1.0 / z)))));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = sqrt((y + 1.0));
	t_2 = sqrt((1.0 + t));
	t_3 = sqrt((1.0 + x));
	t_4 = sqrt(x) + t_3;
	t_5 = sqrt(y) + t_1;
	tmp = 0.0;
	if (z <= 62000000.0)
		tmp = ((sqrt((1.0 + z)) - sqrt(z)) + ((t_1 - sqrt(y)) + (t_3 - sqrt(x)))) + (((1.0 + t) - t) / (t_2 + sqrt(t)));
	else
		tmp = (t_2 - sqrt(t)) + (((t_5 + t_4) / (t_5 * t_4)) + (0.5 * sqrt((1.0 / z))));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[x], $MachinePrecision] + t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[Sqrt[y], $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[z, 62000000.0], N[(N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(t$95$3 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(1.0 + t), $MachinePrecision] - t), $MachinePrecision] / N[(t$95$2 + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$5 + t$95$4), $MachinePrecision] / N[(t$95$5 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{y + 1}\\
t_2 := \sqrt{1 + t}\\
t_3 := \sqrt{1 + x}\\
t_4 := \sqrt{x} + t\_3\\
t_5 := \sqrt{y} + t\_1\\
\mathbf{if}\;z \leq 62000000:\\
\;\;\;\;\left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(t\_1 - \sqrt{y}\right) + \left(t\_3 - \sqrt{x}\right)\right)\right) + \frac{\left(1 + t\right) - t}{t\_2 + \sqrt{t}}\\

\mathbf{else}:\\
\;\;\;\;\left(t\_2 - \sqrt{t}\right) + \left(\frac{t\_5 + t\_4}{t\_5 \cdot t\_4} + 0.5 \cdot \sqrt{\frac{1}{z}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 6.2e7

    1. Initial program 96.8%

      \[\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) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. flip--96.8%

        \[\leadsto \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) + \color{blue}{\frac{\sqrt{t + 1} \cdot \sqrt{t + 1} - \sqrt{t} \cdot \sqrt{t}}{\sqrt{t + 1} + \sqrt{t}}} \]
      2. add-sqr-sqrt77.8%

        \[\leadsto \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) + \frac{\color{blue}{\left(t + 1\right)} - \sqrt{t} \cdot \sqrt{t}}{\sqrt{t + 1} + \sqrt{t}} \]
      3. add-sqr-sqrt97.1%

        \[\leadsto \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) + \frac{\left(t + 1\right) - \color{blue}{t}}{\sqrt{t + 1} + \sqrt{t}} \]
    4. Applied egg-rr97.1%

      \[\leadsto \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) + \color{blue}{\frac{\left(t + 1\right) - t}{\sqrt{t + 1} + \sqrt{t}}} \]

    if 6.2e7 < z

    1. Initial program 83.8%

      \[\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) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative83.8%

        \[\leadsto \left(\color{blue}{\left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      2. flip--83.8%

        \[\leadsto \left(\left(\color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      3. flip--84.0%

        \[\leadsto \left(\left(\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}} + \color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      4. frac-add84.0%

        \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right) + \left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}\right)}{\left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    4. Applied egg-rr84.1%

      \[\leadsto \left(\color{blue}{\frac{\left(\left(1 + y\right) - y\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right) + \left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\left(1 + x\right) - x\right)}{\left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    5. Step-by-step derivation
      1. Simplified91.7%

        \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      2. Taylor expanded in z around inf 97.0%

        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{0.5 \cdot \sqrt{\frac{1}{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    6. Recombined 2 regimes into one program.
    7. Final simplification97.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 62000000:\\ \;\;\;\;\left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{1 + x} - \sqrt{x}\right)\right)\right) + \frac{\left(1 + t\right) - t}{\sqrt{1 + t} + \sqrt{t}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{\left(\sqrt{y} + \sqrt{y + 1}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{y + 1}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + 0.5 \cdot \sqrt{\frac{1}{z}}\right)\\ \end{array} \]
    8. Add Preprocessing

    Alternative 2: 99.3% accurate, 0.5× speedup?

    \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{1 + x}\\ t_2 := \sqrt{1 + z}\\ t_3 := \frac{1}{\sqrt{z} + t\_2}\\ t_4 := \sqrt{1 + t} - \sqrt{t}\\ t_5 := \sqrt{y + 1}\\ t_6 := \sqrt{y} + t\_5\\ \mathbf{if}\;\left(t\_2 - \sqrt{z}\right) + \left(\left(t\_5 - \sqrt{y}\right) + \left(t\_1 - \sqrt{x}\right)\right) \leq 0.99999999999995:\\ \;\;\;\;t\_4 + \left(t\_3 + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_1}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_4 + \left(t\_3 + \frac{1 + \left(t\_6 + \sqrt{x}\right)}{t\_6 \cdot \left(1 + \sqrt{x}\right)}\right)\\ \end{array} \end{array} \]
    NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (sqrt (+ 1.0 x)))
            (t_2 (sqrt (+ 1.0 z)))
            (t_3 (/ 1.0 (+ (sqrt z) t_2)))
            (t_4 (- (sqrt (+ 1.0 t)) (sqrt t)))
            (t_5 (sqrt (+ y 1.0)))
            (t_6 (+ (sqrt y) t_5)))
       (if (<=
            (+ (- t_2 (sqrt z)) (+ (- t_5 (sqrt y)) (- t_1 (sqrt x))))
            0.99999999999995)
         (+ t_4 (+ t_3 (+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) t_1)))))
         (+ t_4 (+ t_3 (/ (+ 1.0 (+ t_6 (sqrt x))) (* t_6 (+ 1.0 (sqrt x)))))))))
    assert(x < y && y < z && z < t);
    double code(double x, double y, double z, double t) {
    	double t_1 = sqrt((1.0 + x));
    	double t_2 = sqrt((1.0 + z));
    	double t_3 = 1.0 / (sqrt(z) + t_2);
    	double t_4 = sqrt((1.0 + t)) - sqrt(t);
    	double t_5 = sqrt((y + 1.0));
    	double t_6 = sqrt(y) + t_5;
    	double tmp;
    	if (((t_2 - sqrt(z)) + ((t_5 - sqrt(y)) + (t_1 - sqrt(x)))) <= 0.99999999999995) {
    		tmp = t_4 + (t_3 + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_1))));
    	} else {
    		tmp = t_4 + (t_3 + ((1.0 + (t_6 + sqrt(x))) / (t_6 * (1.0 + sqrt(x)))));
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: t_5
        real(8) :: t_6
        real(8) :: tmp
        t_1 = sqrt((1.0d0 + x))
        t_2 = sqrt((1.0d0 + z))
        t_3 = 1.0d0 / (sqrt(z) + t_2)
        t_4 = sqrt((1.0d0 + t)) - sqrt(t)
        t_5 = sqrt((y + 1.0d0))
        t_6 = sqrt(y) + t_5
        if (((t_2 - sqrt(z)) + ((t_5 - sqrt(y)) + (t_1 - sqrt(x)))) <= 0.99999999999995d0) then
            tmp = t_4 + (t_3 + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + t_1))))
        else
            tmp = t_4 + (t_3 + ((1.0d0 + (t_6 + sqrt(x))) / (t_6 * (1.0d0 + sqrt(x)))))
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t;
    public static double code(double x, double y, double z, double t) {
    	double t_1 = Math.sqrt((1.0 + x));
    	double t_2 = Math.sqrt((1.0 + z));
    	double t_3 = 1.0 / (Math.sqrt(z) + t_2);
    	double t_4 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
    	double t_5 = Math.sqrt((y + 1.0));
    	double t_6 = Math.sqrt(y) + t_5;
    	double tmp;
    	if (((t_2 - Math.sqrt(z)) + ((t_5 - Math.sqrt(y)) + (t_1 - Math.sqrt(x)))) <= 0.99999999999995) {
    		tmp = t_4 + (t_3 + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + t_1))));
    	} else {
    		tmp = t_4 + (t_3 + ((1.0 + (t_6 + Math.sqrt(x))) / (t_6 * (1.0 + Math.sqrt(x)))));
    	}
    	return tmp;
    }
    
    [x, y, z, t] = sort([x, y, z, t])
    def code(x, y, z, t):
    	t_1 = math.sqrt((1.0 + x))
    	t_2 = math.sqrt((1.0 + z))
    	t_3 = 1.0 / (math.sqrt(z) + t_2)
    	t_4 = math.sqrt((1.0 + t)) - math.sqrt(t)
    	t_5 = math.sqrt((y + 1.0))
    	t_6 = math.sqrt(y) + t_5
    	tmp = 0
    	if ((t_2 - math.sqrt(z)) + ((t_5 - math.sqrt(y)) + (t_1 - math.sqrt(x)))) <= 0.99999999999995:
    		tmp = t_4 + (t_3 + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + t_1))))
    	else:
    		tmp = t_4 + (t_3 + ((1.0 + (t_6 + math.sqrt(x))) / (t_6 * (1.0 + math.sqrt(x)))))
    	return tmp
    
    x, y, z, t = sort([x, y, z, t])
    function code(x, y, z, t)
    	t_1 = sqrt(Float64(1.0 + x))
    	t_2 = sqrt(Float64(1.0 + z))
    	t_3 = Float64(1.0 / Float64(sqrt(z) + t_2))
    	t_4 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t))
    	t_5 = sqrt(Float64(y + 1.0))
    	t_6 = Float64(sqrt(y) + t_5)
    	tmp = 0.0
    	if (Float64(Float64(t_2 - sqrt(z)) + Float64(Float64(t_5 - sqrt(y)) + Float64(t_1 - sqrt(x)))) <= 0.99999999999995)
    		tmp = Float64(t_4 + Float64(t_3 + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + t_1)))));
    	else
    		tmp = Float64(t_4 + Float64(t_3 + Float64(Float64(1.0 + Float64(t_6 + sqrt(x))) / Float64(t_6 * Float64(1.0 + sqrt(x))))));
    	end
    	return tmp
    end
    
    x, y, z, t = num2cell(sort([x, y, z, t])){:}
    function tmp_2 = code(x, y, z, t)
    	t_1 = sqrt((1.0 + x));
    	t_2 = sqrt((1.0 + z));
    	t_3 = 1.0 / (sqrt(z) + t_2);
    	t_4 = sqrt((1.0 + t)) - sqrt(t);
    	t_5 = sqrt((y + 1.0));
    	t_6 = sqrt(y) + t_5;
    	tmp = 0.0;
    	if (((t_2 - sqrt(z)) + ((t_5 - sqrt(y)) + (t_1 - sqrt(x)))) <= 0.99999999999995)
    		tmp = t_4 + (t_3 + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_1))));
    	else
    		tmp = t_4 + (t_3 + ((1.0 + (t_6 + sqrt(x))) / (t_6 * (1.0 + sqrt(x)))));
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[(N[Sqrt[y], $MachinePrecision] + t$95$5), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.99999999999995], N[(t$95$4 + N[(t$95$3 + N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 + N[(t$95$3 + N[(N[(1.0 + N[(t$95$6 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$6 * N[(1.0 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
    
    \begin{array}{l}
    [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
    \\
    \begin{array}{l}
    t_1 := \sqrt{1 + x}\\
    t_2 := \sqrt{1 + z}\\
    t_3 := \frac{1}{\sqrt{z} + t\_2}\\
    t_4 := \sqrt{1 + t} - \sqrt{t}\\
    t_5 := \sqrt{y + 1}\\
    t_6 := \sqrt{y} + t\_5\\
    \mathbf{if}\;\left(t\_2 - \sqrt{z}\right) + \left(\left(t\_5 - \sqrt{y}\right) + \left(t\_1 - \sqrt{x}\right)\right) \leq 0.99999999999995:\\
    \;\;\;\;t\_4 + \left(t\_3 + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_1}\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_4 + \left(t\_3 + \frac{1 + \left(t\_6 + \sqrt{x}\right)}{t\_6 \cdot \left(1 + \sqrt{x}\right)}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) < 0.99999999999995004

      1. Initial program 61.2%

        \[\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) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. +-commutative61.2%

          \[\leadsto \left(\color{blue}{\left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        2. flip--61.3%

          \[\leadsto \left(\left(\color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        3. flip--61.7%

          \[\leadsto \left(\left(\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}} + \color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        4. frac-add61.7%

          \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right) + \left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}\right)}{\left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      4. Applied egg-rr61.9%

        \[\leadsto \left(\color{blue}{\frac{\left(\left(1 + y\right) - y\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right) + \left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\left(1 + x\right) - x\right)}{\left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      5. Step-by-step derivation
        1. Simplified80.2%

          \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        2. Step-by-step derivation
          1. flip--84.6%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          2. div-inv84.6%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          3. add-sqr-sqrt50.6%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(z + 1\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          4. +-commutative50.6%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(1 + z\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          5. add-sqr-sqrt85.8%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - \color{blue}{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          6. +-commutative85.8%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{\color{blue}{1 + z}} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        3. Applied egg-rr85.8%

          \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        4. Step-by-step derivation
          1. associate-*r/85.8%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\left(\left(1 + z\right) - z\right) \cdot 1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          2. *-rgt-identity85.8%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{\left(1 + z\right) - z}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          3. associate--l+94.5%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1 + \left(z - z\right)}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          4. +-inverses94.5%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1 + \color{blue}{0}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          5. metadata-eval94.5%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          6. +-commutative94.5%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1}{\color{blue}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        5. Simplified94.5%

          \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{1}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        6. Taylor expanded in y around inf 92.7%

          \[\leadsto \left(\color{blue}{\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)} + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]

        if 0.99999999999995004 < (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)))

        1. Initial program 97.2%

          \[\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) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. +-commutative97.2%

            \[\leadsto \left(\color{blue}{\left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          2. flip--97.3%

            \[\leadsto \left(\left(\color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          3. flip--97.4%

            \[\leadsto \left(\left(\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}} + \color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          4. frac-add97.4%

            \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right) + \left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}\right)}{\left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        4. Applied egg-rr97.9%

          \[\leadsto \left(\color{blue}{\frac{\left(\left(1 + y\right) - y\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right) + \left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\left(1 + x\right) - x\right)}{\left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        5. Step-by-step derivation
          1. Simplified99.1%

            \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          2. Step-by-step derivation
            1. flip--99.1%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            2. div-inv99.1%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            3. add-sqr-sqrt82.9%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(z + 1\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. +-commutative82.9%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(1 + z\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            5. add-sqr-sqrt99.1%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - \color{blue}{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            6. +-commutative99.1%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{\color{blue}{1 + z}} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          3. Applied egg-rr99.1%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          4. Step-by-step derivation
            1. associate-*r/99.1%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\left(\left(1 + z\right) - z\right) \cdot 1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            2. *-rgt-identity99.1%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{\left(1 + z\right) - z}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            3. associate--l+99.2%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1 + \left(z - z\right)}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. +-inverses99.2%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1 + \color{blue}{0}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            5. metadata-eval99.2%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            6. +-commutative99.2%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1}{\color{blue}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          5. Simplified99.2%

            \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{1}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          6. Taylor expanded in x around 0 95.5%

            \[\leadsto \left(\color{blue}{\frac{1 + \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{1 + y}\right)\right)}{\left(1 + \sqrt{x}\right) \cdot \left(\sqrt{y} + \sqrt{1 + y}\right)}} + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          7. Step-by-step derivation
            1. *-commutative95.5%

              \[\leadsto \left(\frac{1 + \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{1 + y}\right)\right)}{\color{blue}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(1 + \sqrt{x}\right)}} + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          8. Simplified95.5%

            \[\leadsto \left(\color{blue}{\frac{1 + \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{1 + y}\right)\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(1 + \sqrt{x}\right)}} + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        6. Recombined 2 regimes into one program.
        7. Final simplification95.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{1 + x} - \sqrt{x}\right)\right) \leq 0.99999999999995:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \frac{1 + \left(\left(\sqrt{y} + \sqrt{y + 1}\right) + \sqrt{x}\right)}{\left(\sqrt{y} + \sqrt{y + 1}\right) \cdot \left(1 + \sqrt{x}\right)}\right)\\ \end{array} \]
        8. Add Preprocessing

        Alternative 3: 99.2% accurate, 0.5× speedup?

        \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{1 + t} - \sqrt{t}\\ t_2 := \sqrt{1 + x}\\ t_3 := \left(\sqrt{y + 1} - \sqrt{y}\right) + \left(t\_2 - \sqrt{x}\right)\\ t_4 := \sqrt{1 + z}\\ t_5 := \frac{1}{\sqrt{z} + t\_4}\\ \mathbf{if}\;t\_1 + \left(\left(t\_4 - \sqrt{z}\right) + t\_3\right) \leq 1.0002:\\ \;\;\;\;t\_1 + \left(t\_5 + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 + \left(t\_5 + t\_3\right)\\ \end{array} \end{array} \]
        NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (- (sqrt (+ 1.0 t)) (sqrt t)))
                (t_2 (sqrt (+ 1.0 x)))
                (t_3 (+ (- (sqrt (+ y 1.0)) (sqrt y)) (- t_2 (sqrt x))))
                (t_4 (sqrt (+ 1.0 z)))
                (t_5 (/ 1.0 (+ (sqrt z) t_4))))
           (if (<= (+ t_1 (+ (- t_4 (sqrt z)) t_3)) 1.0002)
             (+ t_1 (+ t_5 (+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) t_2)))))
             (+ t_1 (+ t_5 t_3)))))
        assert(x < y && y < z && z < t);
        double code(double x, double y, double z, double t) {
        	double t_1 = sqrt((1.0 + t)) - sqrt(t);
        	double t_2 = sqrt((1.0 + x));
        	double t_3 = (sqrt((y + 1.0)) - sqrt(y)) + (t_2 - sqrt(x));
        	double t_4 = sqrt((1.0 + z));
        	double t_5 = 1.0 / (sqrt(z) + t_4);
        	double tmp;
        	if ((t_1 + ((t_4 - sqrt(z)) + t_3)) <= 1.0002) {
        		tmp = t_1 + (t_5 + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_2))));
        	} else {
        		tmp = t_1 + (t_5 + t_3);
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: t_5
            real(8) :: tmp
            t_1 = sqrt((1.0d0 + t)) - sqrt(t)
            t_2 = sqrt((1.0d0 + x))
            t_3 = (sqrt((y + 1.0d0)) - sqrt(y)) + (t_2 - sqrt(x))
            t_4 = sqrt((1.0d0 + z))
            t_5 = 1.0d0 / (sqrt(z) + t_4)
            if ((t_1 + ((t_4 - sqrt(z)) + t_3)) <= 1.0002d0) then
                tmp = t_1 + (t_5 + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + t_2))))
            else
                tmp = t_1 + (t_5 + t_3)
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < t;
        public static double code(double x, double y, double z, double t) {
        	double t_1 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
        	double t_2 = Math.sqrt((1.0 + x));
        	double t_3 = (Math.sqrt((y + 1.0)) - Math.sqrt(y)) + (t_2 - Math.sqrt(x));
        	double t_4 = Math.sqrt((1.0 + z));
        	double t_5 = 1.0 / (Math.sqrt(z) + t_4);
        	double tmp;
        	if ((t_1 + ((t_4 - Math.sqrt(z)) + t_3)) <= 1.0002) {
        		tmp = t_1 + (t_5 + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + t_2))));
        	} else {
        		tmp = t_1 + (t_5 + t_3);
        	}
        	return tmp;
        }
        
        [x, y, z, t] = sort([x, y, z, t])
        def code(x, y, z, t):
        	t_1 = math.sqrt((1.0 + t)) - math.sqrt(t)
        	t_2 = math.sqrt((1.0 + x))
        	t_3 = (math.sqrt((y + 1.0)) - math.sqrt(y)) + (t_2 - math.sqrt(x))
        	t_4 = math.sqrt((1.0 + z))
        	t_5 = 1.0 / (math.sqrt(z) + t_4)
        	tmp = 0
        	if (t_1 + ((t_4 - math.sqrt(z)) + t_3)) <= 1.0002:
        		tmp = t_1 + (t_5 + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + t_2))))
        	else:
        		tmp = t_1 + (t_5 + t_3)
        	return tmp
        
        x, y, z, t = sort([x, y, z, t])
        function code(x, y, z, t)
        	t_1 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t))
        	t_2 = sqrt(Float64(1.0 + x))
        	t_3 = Float64(Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) + Float64(t_2 - sqrt(x)))
        	t_4 = sqrt(Float64(1.0 + z))
        	t_5 = Float64(1.0 / Float64(sqrt(z) + t_4))
        	tmp = 0.0
        	if (Float64(t_1 + Float64(Float64(t_4 - sqrt(z)) + t_3)) <= 1.0002)
        		tmp = Float64(t_1 + Float64(t_5 + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + t_2)))));
        	else
        		tmp = Float64(t_1 + Float64(t_5 + t_3));
        	end
        	return tmp
        end
        
        x, y, z, t = num2cell(sort([x, y, z, t])){:}
        function tmp_2 = code(x, y, z, t)
        	t_1 = sqrt((1.0 + t)) - sqrt(t);
        	t_2 = sqrt((1.0 + x));
        	t_3 = (sqrt((y + 1.0)) - sqrt(y)) + (t_2 - sqrt(x));
        	t_4 = sqrt((1.0 + z));
        	t_5 = 1.0 / (sqrt(z) + t_4);
        	tmp = 0.0;
        	if ((t_1 + ((t_4 - sqrt(z)) + t_3)) <= 1.0002)
        		tmp = t_1 + (t_5 + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_2))));
        	else
        		tmp = t_1 + (t_5 + t_3);
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 + N[(N[(t$95$4 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision], 1.0002], N[(t$95$1 + N[(t$95$5 + N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(t$95$5 + t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]
        
        \begin{array}{l}
        [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
        \\
        \begin{array}{l}
        t_1 := \sqrt{1 + t} - \sqrt{t}\\
        t_2 := \sqrt{1 + x}\\
        t_3 := \left(\sqrt{y + 1} - \sqrt{y}\right) + \left(t\_2 - \sqrt{x}\right)\\
        t_4 := \sqrt{1 + z}\\
        t_5 := \frac{1}{\sqrt{z} + t\_4}\\
        \mathbf{if}\;t\_1 + \left(\left(t\_4 - \sqrt{z}\right) + t\_3\right) \leq 1.0002:\\
        \;\;\;\;t\_1 + \left(t\_5 + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_2}\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1 + \left(t\_5 + t\_3\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 1.0002

          1. Initial program 75.3%

            \[\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) \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. +-commutative75.3%

              \[\leadsto \left(\color{blue}{\left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            2. flip--75.3%

              \[\leadsto \left(\left(\color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            3. flip--75.5%

              \[\leadsto \left(\left(\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}} + \color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. frac-add75.5%

              \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right) + \left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}\right)}{\left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          4. Applied egg-rr76.0%

            \[\leadsto \left(\color{blue}{\frac{\left(\left(1 + y\right) - y\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right) + \left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\left(1 + x\right) - x\right)}{\left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          5. Step-by-step derivation
            1. Simplified87.6%

              \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            2. Step-by-step derivation
              1. flip--90.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              2. div-inv90.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              3. add-sqr-sqrt60.5%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(z + 1\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. +-commutative60.5%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(1 + z\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. add-sqr-sqrt91.0%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - \color{blue}{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              6. +-commutative91.0%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{\color{blue}{1 + z}} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            3. Applied egg-rr91.0%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. Step-by-step derivation
              1. associate-*r/91.0%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\left(\left(1 + z\right) - z\right) \cdot 1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              2. *-rgt-identity91.0%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{\left(1 + z\right) - z}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              3. associate--l+96.4%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1 + \left(z - z\right)}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. +-inverses96.4%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1 + \color{blue}{0}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. metadata-eval96.4%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              6. +-commutative96.4%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1}{\color{blue}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            5. Simplified96.4%

              \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{1}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            6. Taylor expanded in y around inf 80.7%

              \[\leadsto \left(\color{blue}{\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)} + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]

            if 1.0002 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t)))

            1. Initial program 97.5%

              \[\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) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. flip--99.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              2. div-inv99.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              3. add-sqr-sqrt84.5%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(z + 1\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. +-commutative84.5%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(1 + z\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. add-sqr-sqrt99.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - \color{blue}{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              6. +-commutative99.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{\color{blue}{1 + z}} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. Applied egg-rr97.5%

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \color{blue}{\left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            5. Step-by-step derivation
              1. associate-*r/99.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\left(\left(1 + z\right) - z\right) \cdot 1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              2. *-rgt-identity99.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{\left(1 + z\right) - z}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              3. associate--l+99.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1 + \left(z - z\right)}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. +-inverses99.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1 + \color{blue}{0}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. metadata-eval99.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              6. +-commutative99.2%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1}{\color{blue}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            6. Simplified97.5%

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \color{blue}{\frac{1}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          6. Recombined 2 regimes into one program.
          7. Final simplification92.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{1 + x} - \sqrt{x}\right)\right)\right) \leq 1.0002:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{1 + x} - \sqrt{x}\right)\right)\right)\\ \end{array} \]
          8. Add Preprocessing

          Alternative 4: 95.9% accurate, 0.6× speedup?

          \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{1 + x}\\ t_2 := \sqrt{1 + z}\\ t_3 := t\_2 - \sqrt{z}\\ t_4 := \sqrt{1 + t} - \sqrt{t}\\ t_5 := \sqrt{y + 1} - \sqrt{y}\\ \mathbf{if}\;t\_3 + \left(t\_5 + \left(t\_1 - \sqrt{x}\right)\right) \leq 1:\\ \;\;\;\;t\_4 + \left(\frac{1}{\sqrt{z} + t\_2} + \frac{1}{\sqrt{x} + t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_4 + \left(t\_3 + \left(t\_5 + \left(1 - \sqrt{x}\right)\right)\right)\\ \end{array} \end{array} \]
          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (sqrt (+ 1.0 x)))
                  (t_2 (sqrt (+ 1.0 z)))
                  (t_3 (- t_2 (sqrt z)))
                  (t_4 (- (sqrt (+ 1.0 t)) (sqrt t)))
                  (t_5 (- (sqrt (+ y 1.0)) (sqrt y))))
             (if (<= (+ t_3 (+ t_5 (- t_1 (sqrt x)))) 1.0)
               (+ t_4 (+ (/ 1.0 (+ (sqrt z) t_2)) (/ 1.0 (+ (sqrt x) t_1))))
               (+ t_4 (+ t_3 (+ t_5 (- 1.0 (sqrt x))))))))
          assert(x < y && y < z && z < t);
          double code(double x, double y, double z, double t) {
          	double t_1 = sqrt((1.0 + x));
          	double t_2 = sqrt((1.0 + z));
          	double t_3 = t_2 - sqrt(z);
          	double t_4 = sqrt((1.0 + t)) - sqrt(t);
          	double t_5 = sqrt((y + 1.0)) - sqrt(y);
          	double tmp;
          	if ((t_3 + (t_5 + (t_1 - sqrt(x)))) <= 1.0) {
          		tmp = t_4 + ((1.0 / (sqrt(z) + t_2)) + (1.0 / (sqrt(x) + t_1)));
          	} else {
          		tmp = t_4 + (t_3 + (t_5 + (1.0 - sqrt(x))));
          	}
          	return tmp;
          }
          
          NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: t_5
              real(8) :: tmp
              t_1 = sqrt((1.0d0 + x))
              t_2 = sqrt((1.0d0 + z))
              t_3 = t_2 - sqrt(z)
              t_4 = sqrt((1.0d0 + t)) - sqrt(t)
              t_5 = sqrt((y + 1.0d0)) - sqrt(y)
              if ((t_3 + (t_5 + (t_1 - sqrt(x)))) <= 1.0d0) then
                  tmp = t_4 + ((1.0d0 / (sqrt(z) + t_2)) + (1.0d0 / (sqrt(x) + t_1)))
              else
                  tmp = t_4 + (t_3 + (t_5 + (1.0d0 - sqrt(x))))
              end if
              code = tmp
          end function
          
          assert x < y && y < z && z < t;
          public static double code(double x, double y, double z, double t) {
          	double t_1 = Math.sqrt((1.0 + x));
          	double t_2 = Math.sqrt((1.0 + z));
          	double t_3 = t_2 - Math.sqrt(z);
          	double t_4 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
          	double t_5 = Math.sqrt((y + 1.0)) - Math.sqrt(y);
          	double tmp;
          	if ((t_3 + (t_5 + (t_1 - Math.sqrt(x)))) <= 1.0) {
          		tmp = t_4 + ((1.0 / (Math.sqrt(z) + t_2)) + (1.0 / (Math.sqrt(x) + t_1)));
          	} else {
          		tmp = t_4 + (t_3 + (t_5 + (1.0 - Math.sqrt(x))));
          	}
          	return tmp;
          }
          
          [x, y, z, t] = sort([x, y, z, t])
          def code(x, y, z, t):
          	t_1 = math.sqrt((1.0 + x))
          	t_2 = math.sqrt((1.0 + z))
          	t_3 = t_2 - math.sqrt(z)
          	t_4 = math.sqrt((1.0 + t)) - math.sqrt(t)
          	t_5 = math.sqrt((y + 1.0)) - math.sqrt(y)
          	tmp = 0
          	if (t_3 + (t_5 + (t_1 - math.sqrt(x)))) <= 1.0:
          		tmp = t_4 + ((1.0 / (math.sqrt(z) + t_2)) + (1.0 / (math.sqrt(x) + t_1)))
          	else:
          		tmp = t_4 + (t_3 + (t_5 + (1.0 - math.sqrt(x))))
          	return tmp
          
          x, y, z, t = sort([x, y, z, t])
          function code(x, y, z, t)
          	t_1 = sqrt(Float64(1.0 + x))
          	t_2 = sqrt(Float64(1.0 + z))
          	t_3 = Float64(t_2 - sqrt(z))
          	t_4 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t))
          	t_5 = Float64(sqrt(Float64(y + 1.0)) - sqrt(y))
          	tmp = 0.0
          	if (Float64(t_3 + Float64(t_5 + Float64(t_1 - sqrt(x)))) <= 1.0)
          		tmp = Float64(t_4 + Float64(Float64(1.0 / Float64(sqrt(z) + t_2)) + Float64(1.0 / Float64(sqrt(x) + t_1))));
          	else
          		tmp = Float64(t_4 + Float64(t_3 + Float64(t_5 + Float64(1.0 - sqrt(x)))));
          	end
          	return tmp
          end
          
          x, y, z, t = num2cell(sort([x, y, z, t])){:}
          function tmp_2 = code(x, y, z, t)
          	t_1 = sqrt((1.0 + x));
          	t_2 = sqrt((1.0 + z));
          	t_3 = t_2 - sqrt(z);
          	t_4 = sqrt((1.0 + t)) - sqrt(t);
          	t_5 = sqrt((y + 1.0)) - sqrt(y);
          	tmp = 0.0;
          	if ((t_3 + (t_5 + (t_1 - sqrt(x)))) <= 1.0)
          		tmp = t_4 + ((1.0 / (sqrt(z) + t_2)) + (1.0 / (sqrt(x) + t_1)));
          	else
          		tmp = t_4 + (t_3 + (t_5 + (1.0 - sqrt(x))));
          	end
          	tmp_2 = tmp;
          end
          
          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$3 + N[(t$95$5 + N[(t$95$1 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0], N[(t$95$4 + N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 + N[(t$95$3 + N[(t$95$5 + N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
          
          \begin{array}{l}
          [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
          \\
          \begin{array}{l}
          t_1 := \sqrt{1 + x}\\
          t_2 := \sqrt{1 + z}\\
          t_3 := t\_2 - \sqrt{z}\\
          t_4 := \sqrt{1 + t} - \sqrt{t}\\
          t_5 := \sqrt{y + 1} - \sqrt{y}\\
          \mathbf{if}\;t\_3 + \left(t\_5 + \left(t\_1 - \sqrt{x}\right)\right) \leq 1:\\
          \;\;\;\;t\_4 + \left(\frac{1}{\sqrt{z} + t\_2} + \frac{1}{\sqrt{x} + t\_1}\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_4 + \left(t\_3 + \left(t\_5 + \left(1 - \sqrt{x}\right)\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) < 1

            1. Initial program 83.0%

              \[\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) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. +-commutative83.0%

                \[\leadsto \left(\color{blue}{\left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              2. flip--83.0%

                \[\leadsto \left(\left(\color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              3. flip--83.2%

                \[\leadsto \left(\left(\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}} + \color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. frac-add83.2%

                \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right) + \left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}\right)}{\left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. Applied egg-rr83.3%

              \[\leadsto \left(\color{blue}{\frac{\left(\left(1 + y\right) - y\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right) + \left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\left(1 + x\right) - x\right)}{\left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            5. Step-by-step derivation
              1. Simplified91.4%

                \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              2. Step-by-step derivation
                1. flip--93.1%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                2. div-inv93.1%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                3. add-sqr-sqrt63.6%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(z + 1\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                4. +-commutative63.6%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(1 + z\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                5. add-sqr-sqrt93.6%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - \color{blue}{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                6. +-commutative93.6%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{\color{blue}{1 + z}} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              3. Applied egg-rr93.6%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. Step-by-step derivation
                1. associate-*r/93.6%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\left(\left(1 + z\right) - z\right) \cdot 1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                2. *-rgt-identity93.6%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{\left(1 + z\right) - z}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                3. associate--l+97.3%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1 + \left(z - z\right)}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                4. +-inverses97.3%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1 + \color{blue}{0}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                5. metadata-eval97.3%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                6. +-commutative97.3%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1}{\color{blue}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. Simplified97.3%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{1}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              6. Taylor expanded in y around inf 70.1%

                \[\leadsto \color{blue}{\left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              7. Step-by-step derivation
                1. +-commutative70.1%

                  \[\leadsto \color{blue}{\left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              8. Simplified70.1%

                \[\leadsto \color{blue}{\left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]

              if 1 < (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)))

              1. Initial program 97.1%

                \[\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) \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0 70.9%

                \[\leadsto \left(\left(\color{blue}{\left(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) \]
            6. Recombined 2 regimes into one program.
            7. Final simplification70.5%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{1 + x} - \sqrt{x}\right)\right) \leq 1:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right)\right)\\ \end{array} \]
            8. Add Preprocessing

            Alternative 5: 99.4% accurate, 0.7× speedup?

            \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{y} + \sqrt{y + 1}\\ t_2 := \sqrt{x} + \sqrt{1 + x}\\ \left(\frac{t\_1 + t\_2}{t\_1 \cdot t\_2} + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right) \end{array} \end{array} \]
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (+ (sqrt y) (sqrt (+ y 1.0))))
                    (t_2 (+ (sqrt x) (sqrt (+ 1.0 x)))))
               (+
                (+ (/ (+ t_1 t_2) (* t_1 t_2)) (/ 1.0 (+ (sqrt z) (sqrt (+ 1.0 z)))))
                (- (sqrt (+ 1.0 t)) (sqrt t)))))
            assert(x < y && y < z && z < t);
            double code(double x, double y, double z, double t) {
            	double t_1 = sqrt(y) + sqrt((y + 1.0));
            	double t_2 = sqrt(x) + sqrt((1.0 + x));
            	return (((t_1 + t_2) / (t_1 * t_2)) + (1.0 / (sqrt(z) + sqrt((1.0 + z))))) + (sqrt((1.0 + t)) - sqrt(t));
            }
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
                t_1 = sqrt(y) + sqrt((y + 1.0d0))
                t_2 = sqrt(x) + sqrt((1.0d0 + x))
                code = (((t_1 + t_2) / (t_1 * t_2)) + (1.0d0 / (sqrt(z) + sqrt((1.0d0 + z))))) + (sqrt((1.0d0 + t)) - sqrt(t))
            end function
            
            assert x < y && y < z && z < t;
            public static double code(double x, double y, double z, double t) {
            	double t_1 = Math.sqrt(y) + Math.sqrt((y + 1.0));
            	double t_2 = Math.sqrt(x) + Math.sqrt((1.0 + x));
            	return (((t_1 + t_2) / (t_1 * t_2)) + (1.0 / (Math.sqrt(z) + Math.sqrt((1.0 + z))))) + (Math.sqrt((1.0 + t)) - Math.sqrt(t));
            }
            
            [x, y, z, t] = sort([x, y, z, t])
            def code(x, y, z, t):
            	t_1 = math.sqrt(y) + math.sqrt((y + 1.0))
            	t_2 = math.sqrt(x) + math.sqrt((1.0 + x))
            	return (((t_1 + t_2) / (t_1 * t_2)) + (1.0 / (math.sqrt(z) + math.sqrt((1.0 + z))))) + (math.sqrt((1.0 + t)) - math.sqrt(t))
            
            x, y, z, t = sort([x, y, z, t])
            function code(x, y, z, t)
            	t_1 = Float64(sqrt(y) + sqrt(Float64(y + 1.0)))
            	t_2 = Float64(sqrt(x) + sqrt(Float64(1.0 + x)))
            	return Float64(Float64(Float64(Float64(t_1 + t_2) / Float64(t_1 * t_2)) + Float64(1.0 / Float64(sqrt(z) + sqrt(Float64(1.0 + z))))) + Float64(sqrt(Float64(1.0 + t)) - sqrt(t)))
            end
            
            x, y, z, t = num2cell(sort([x, y, z, t])){:}
            function tmp = code(x, y, z, t)
            	t_1 = sqrt(y) + sqrt((y + 1.0));
            	t_2 = sqrt(x) + sqrt((1.0 + x));
            	tmp = (((t_1 + t_2) / (t_1 * t_2)) + (1.0 / (sqrt(z) + sqrt((1.0 + z))))) + (sqrt((1.0 + t)) - sqrt(t));
            end
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(t$95$1 + t$95$2), $MachinePrecision] / N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
            \\
            \begin{array}{l}
            t_1 := \sqrt{y} + \sqrt{y + 1}\\
            t_2 := \sqrt{x} + \sqrt{1 + x}\\
            \left(\frac{t\_1 + t\_2}{t\_1 \cdot t\_2} + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)
            \end{array}
            \end{array}
            
            Derivation
            1. Initial program 90.5%

              \[\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) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. +-commutative90.5%

                \[\leadsto \left(\color{blue}{\left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              2. flip--90.5%

                \[\leadsto \left(\left(\color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              3. flip--90.7%

                \[\leadsto \left(\left(\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}} + \color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. frac-add90.7%

                \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right) + \left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}\right)}{\left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. Applied egg-rr91.1%

              \[\leadsto \left(\color{blue}{\frac{\left(\left(1 + y\right) - y\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right) + \left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\left(1 + x\right) - x\right)}{\left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            5. Step-by-step derivation
              1. Simplified95.5%

                \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              2. Step-by-step derivation
                1. flip--96.4%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                2. div-inv96.4%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                3. add-sqr-sqrt76.9%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(z + 1\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                4. +-commutative76.9%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(1 + z\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                5. add-sqr-sqrt96.6%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - \color{blue}{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                6. +-commutative96.6%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{\color{blue}{1 + z}} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              3. Applied egg-rr96.6%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. Step-by-step derivation
                1. associate-*r/96.6%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\left(\left(1 + z\right) - z\right) \cdot 1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                2. *-rgt-identity96.6%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{\left(1 + z\right) - z}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                3. associate--l+98.3%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1 + \left(z - z\right)}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                4. +-inverses98.3%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1 + \color{blue}{0}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                5. metadata-eval98.3%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                6. +-commutative98.3%

                  \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1}{\color{blue}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. Simplified98.3%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{1}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              6. Final simplification98.3%

                \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{y + 1}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{y + 1}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right) \]
              7. Add Preprocessing

              Alternative 6: 98.1% accurate, 0.7× speedup?

              \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{x} + \sqrt{1 + x}\\ t_2 := \sqrt{y} + \sqrt{y + 1}\\ \left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{t\_2 + t\_1}{t\_2 \cdot t\_1} + \left(\sqrt{1 + z} - \sqrt{z}\right)\right) \end{array} \end{array} \]
              NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
              (FPCore (x y z t)
               :precision binary64
               (let* ((t_1 (+ (sqrt x) (sqrt (+ 1.0 x))))
                      (t_2 (+ (sqrt y) (sqrt (+ y 1.0)))))
                 (+
                  (- (sqrt (+ 1.0 t)) (sqrt t))
                  (+ (/ (+ t_2 t_1) (* t_2 t_1)) (- (sqrt (+ 1.0 z)) (sqrt z))))))
              assert(x < y && y < z && z < t);
              double code(double x, double y, double z, double t) {
              	double t_1 = sqrt(x) + sqrt((1.0 + x));
              	double t_2 = sqrt(y) + sqrt((y + 1.0));
              	return (sqrt((1.0 + t)) - sqrt(t)) + (((t_2 + t_1) / (t_2 * t_1)) + (sqrt((1.0 + z)) - sqrt(z)));
              }
              
              NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
                  t_1 = sqrt(x) + sqrt((1.0d0 + x))
                  t_2 = sqrt(y) + sqrt((y + 1.0d0))
                  code = (sqrt((1.0d0 + t)) - sqrt(t)) + (((t_2 + t_1) / (t_2 * t_1)) + (sqrt((1.0d0 + z)) - sqrt(z)))
              end function
              
              assert x < y && y < z && z < t;
              public static double code(double x, double y, double z, double t) {
              	double t_1 = Math.sqrt(x) + Math.sqrt((1.0 + x));
              	double t_2 = Math.sqrt(y) + Math.sqrt((y + 1.0));
              	return (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + (((t_2 + t_1) / (t_2 * t_1)) + (Math.sqrt((1.0 + z)) - Math.sqrt(z)));
              }
              
              [x, y, z, t] = sort([x, y, z, t])
              def code(x, y, z, t):
              	t_1 = math.sqrt(x) + math.sqrt((1.0 + x))
              	t_2 = math.sqrt(y) + math.sqrt((y + 1.0))
              	return (math.sqrt((1.0 + t)) - math.sqrt(t)) + (((t_2 + t_1) / (t_2 * t_1)) + (math.sqrt((1.0 + z)) - math.sqrt(z)))
              
              x, y, z, t = sort([x, y, z, t])
              function code(x, y, z, t)
              	t_1 = Float64(sqrt(x) + sqrt(Float64(1.0 + x)))
              	t_2 = Float64(sqrt(y) + sqrt(Float64(y + 1.0)))
              	return Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(Float64(Float64(t_2 + t_1) / Float64(t_2 * t_1)) + Float64(sqrt(Float64(1.0 + z)) - sqrt(z))))
              end
              
              x, y, z, t = num2cell(sort([x, y, z, t])){:}
              function tmp = code(x, y, z, t)
              	t_1 = sqrt(x) + sqrt((1.0 + x));
              	t_2 = sqrt(y) + sqrt((y + 1.0));
              	tmp = (sqrt((1.0 + t)) - sqrt(t)) + (((t_2 + t_1) / (t_2 * t_1)) + (sqrt((1.0 + z)) - sqrt(z)));
              end
              
              NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
              code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$2 + t$95$1), $MachinePrecision] / N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
              \\
              \begin{array}{l}
              t_1 := \sqrt{x} + \sqrt{1 + x}\\
              t_2 := \sqrt{y} + \sqrt{y + 1}\\
              \left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{t\_2 + t\_1}{t\_2 \cdot t\_1} + \left(\sqrt{1 + z} - \sqrt{z}\right)\right)
              \end{array}
              \end{array}
              
              Derivation
              1. Initial program 90.5%

                \[\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) \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. +-commutative90.5%

                  \[\leadsto \left(\color{blue}{\left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                2. flip--90.5%

                  \[\leadsto \left(\left(\color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                3. flip--90.7%

                  \[\leadsto \left(\left(\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}} + \color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                4. frac-add90.7%

                  \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right) + \left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}\right)}{\left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. Applied egg-rr91.1%

                \[\leadsto \left(\color{blue}{\frac{\left(\left(1 + y\right) - y\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right) + \left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\left(1 + x\right) - x\right)}{\left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. Step-by-step derivation
                1. Simplified95.5%

                  \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                2. Final simplification95.5%

                  \[\leadsto \left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{\left(\sqrt{y} + \sqrt{y + 1}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{y + 1}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\sqrt{1 + z} - \sqrt{z}\right)\right) \]
                3. Add Preprocessing

                Alternative 7: 97.8% accurate, 0.9× speedup?

                \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{y + 1} - \sqrt{y}\\ t_2 := \sqrt{1 + z}\\ t_3 := \sqrt{1 + t} - \sqrt{t}\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{-7}:\\ \;\;\;\;t\_3 + \left(\frac{1}{\sqrt{z} + t\_2} + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3 + \left(\left(t\_2 - \sqrt{z}\right) + \left(t\_1 + \left(1 - \sqrt{x}\right)\right)\right)\\ \end{array} \end{array} \]
                NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                (FPCore (x y z t)
                 :precision binary64
                 (let* ((t_1 (- (sqrt (+ y 1.0)) (sqrt y)))
                        (t_2 (sqrt (+ 1.0 z)))
                        (t_3 (- (sqrt (+ 1.0 t)) (sqrt t))))
                   (if (<= t_1 2e-7)
                     (+
                      t_3
                      (+
                       (/ 1.0 (+ (sqrt z) t_2))
                       (+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))))))
                     (+ t_3 (+ (- t_2 (sqrt z)) (+ t_1 (- 1.0 (sqrt x))))))))
                assert(x < y && y < z && z < t);
                double code(double x, double y, double z, double t) {
                	double t_1 = sqrt((y + 1.0)) - sqrt(y);
                	double t_2 = sqrt((1.0 + z));
                	double t_3 = sqrt((1.0 + t)) - sqrt(t);
                	double tmp;
                	if (t_1 <= 2e-7) {
                		tmp = t_3 + ((1.0 / (sqrt(z) + t_2)) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))));
                	} else {
                		tmp = t_3 + ((t_2 - sqrt(z)) + (t_1 + (1.0 - sqrt(x))));
                	}
                	return tmp;
                }
                
                NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                    t_1 = sqrt((y + 1.0d0)) - sqrt(y)
                    t_2 = sqrt((1.0d0 + z))
                    t_3 = sqrt((1.0d0 + t)) - sqrt(t)
                    if (t_1 <= 2d-7) then
                        tmp = t_3 + ((1.0d0 / (sqrt(z) + t_2)) + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x))))))
                    else
                        tmp = t_3 + ((t_2 - sqrt(z)) + (t_1 + (1.0d0 - sqrt(x))))
                    end if
                    code = tmp
                end function
                
                assert x < y && y < z && z < t;
                public static double code(double x, double y, double z, double t) {
                	double t_1 = Math.sqrt((y + 1.0)) - Math.sqrt(y);
                	double t_2 = Math.sqrt((1.0 + z));
                	double t_3 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
                	double tmp;
                	if (t_1 <= 2e-7) {
                		tmp = t_3 + ((1.0 / (Math.sqrt(z) + t_2)) + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x))))));
                	} else {
                		tmp = t_3 + ((t_2 - Math.sqrt(z)) + (t_1 + (1.0 - Math.sqrt(x))));
                	}
                	return tmp;
                }
                
                [x, y, z, t] = sort([x, y, z, t])
                def code(x, y, z, t):
                	t_1 = math.sqrt((y + 1.0)) - math.sqrt(y)
                	t_2 = math.sqrt((1.0 + z))
                	t_3 = math.sqrt((1.0 + t)) - math.sqrt(t)
                	tmp = 0
                	if t_1 <= 2e-7:
                		tmp = t_3 + ((1.0 / (math.sqrt(z) + t_2)) + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + math.sqrt((1.0 + x))))))
                	else:
                		tmp = t_3 + ((t_2 - math.sqrt(z)) + (t_1 + (1.0 - math.sqrt(x))))
                	return tmp
                
                x, y, z, t = sort([x, y, z, t])
                function code(x, y, z, t)
                	t_1 = Float64(sqrt(Float64(y + 1.0)) - sqrt(y))
                	t_2 = sqrt(Float64(1.0 + z))
                	t_3 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t))
                	tmp = 0.0
                	if (t_1 <= 2e-7)
                		tmp = Float64(t_3 + Float64(Float64(1.0 / Float64(sqrt(z) + t_2)) + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))))));
                	else
                		tmp = Float64(t_3 + Float64(Float64(t_2 - sqrt(z)) + Float64(t_1 + Float64(1.0 - sqrt(x)))));
                	end
                	return tmp
                end
                
                x, y, z, t = num2cell(sort([x, y, z, t])){:}
                function tmp_2 = code(x, y, z, t)
                	t_1 = sqrt((y + 1.0)) - sqrt(y);
                	t_2 = sqrt((1.0 + z));
                	t_3 = sqrt((1.0 + t)) - sqrt(t);
                	tmp = 0.0;
                	if (t_1 <= 2e-7)
                		tmp = t_3 + ((1.0 / (sqrt(z) + t_2)) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))));
                	else
                		tmp = t_3 + ((t_2 - sqrt(z)) + (t_1 + (1.0 - sqrt(x))));
                	end
                	tmp_2 = tmp;
                end
                
                NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e-7], N[(t$95$3 + N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 + N[(N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                
                \begin{array}{l}
                [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                \\
                \begin{array}{l}
                t_1 := \sqrt{y + 1} - \sqrt{y}\\
                t_2 := \sqrt{1 + z}\\
                t_3 := \sqrt{1 + t} - \sqrt{t}\\
                \mathbf{if}\;t\_1 \leq 2 \cdot 10^{-7}:\\
                \;\;\;\;t\_3 + \left(\frac{1}{\sqrt{z} + t\_2} + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_3 + \left(\left(t\_2 - \sqrt{z}\right) + \left(t\_1 + \left(1 - \sqrt{x}\right)\right)\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y)) < 1.9999999999999999e-7

                  1. Initial program 83.2%

                    \[\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) \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. +-commutative83.2%

                      \[\leadsto \left(\color{blue}{\left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    2. flip--83.2%

                      \[\leadsto \left(\left(\color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    3. flip--83.4%

                      \[\leadsto \left(\left(\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}} + \color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    4. frac-add83.4%

                      \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right) + \left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}\right)}{\left(\sqrt{y + 1} + \sqrt{y}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                  4. Applied egg-rr83.7%

                    \[\leadsto \left(\color{blue}{\frac{\left(\left(1 + y\right) - y\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right) + \left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\left(1 + x\right) - x\right)}{\left(\sqrt{1 + y} + \sqrt{y}\right) \cdot \left(\sqrt{1 + x} + \sqrt{x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                  5. Step-by-step derivation
                    1. Simplified91.8%

                      \[\leadsto \left(\color{blue}{\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)}} + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    2. Step-by-step derivation
                      1. flip--93.5%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      2. div-inv93.5%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\sqrt{z + 1} \cdot \sqrt{z + 1} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      3. add-sqr-sqrt75.8%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(z + 1\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      4. +-commutative75.8%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\color{blue}{\left(1 + z\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      5. add-sqr-sqrt94.0%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - \color{blue}{z}\right) \cdot \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      6. +-commutative94.0%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{\color{blue}{1 + z}} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    3. Applied egg-rr94.0%

                      \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\left(\left(1 + z\right) - z\right) \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    4. Step-by-step derivation
                      1. associate-*r/94.0%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{\left(\left(1 + z\right) - z\right) \cdot 1}{\sqrt{1 + z} + \sqrt{z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      2. *-rgt-identity94.0%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{\left(1 + z\right) - z}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      3. associate--l+97.3%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1 + \left(z - z\right)}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      4. +-inverses97.3%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1 + \color{blue}{0}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      5. metadata-eval97.3%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{\color{blue}{1}}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      6. +-commutative97.3%

                        \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \frac{1}{\color{blue}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    5. Simplified97.3%

                      \[\leadsto \left(\frac{\left(\sqrt{y} + \sqrt{1 + y}\right) + \left(\sqrt{x} + \sqrt{1 + x}\right)}{\left(\sqrt{y} + \sqrt{1 + y}\right) \cdot \left(\sqrt{x} + \sqrt{1 + x}\right)} + \color{blue}{\frac{1}{\sqrt{z} + \sqrt{1 + z}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    6. Taylor expanded in y around inf 97.3%

                      \[\leadsto \left(\color{blue}{\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)} + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]

                    if 1.9999999999999999e-7 < (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))

                    1. Initial program 97.4%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0 49.7%

                      \[\leadsto \left(\left(\color{blue}{\left(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) \]
                  6. Recombined 2 regimes into one program.
                  7. Final simplification72.9%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{y + 1} - \sqrt{y} \leq 2 \cdot 10^{-7}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right)\right)\\ \end{array} \]
                  8. Add Preprocessing

                  Alternative 8: 97.7% accurate, 0.9× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{1 + z} - \sqrt{z}\\ t_2 := \sqrt{y + 1} - \sqrt{y}\\ t_3 := \sqrt{1 + t} - \sqrt{t}\\ \mathbf{if}\;t\_2 \leq 2 \cdot 10^{-7}:\\ \;\;\;\;t\_3 + \left(t\_1 + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3 + \left(t\_1 + \left(t\_2 + \left(1 - \sqrt{x}\right)\right)\right)\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (let* ((t_1 (- (sqrt (+ 1.0 z)) (sqrt z)))
                          (t_2 (- (sqrt (+ y 1.0)) (sqrt y)))
                          (t_3 (- (sqrt (+ 1.0 t)) (sqrt t))))
                     (if (<= t_2 2e-7)
                       (+
                        t_3
                        (+
                         t_1
                         (+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))))))
                       (+ t_3 (+ t_1 (+ t_2 (- 1.0 (sqrt x))))))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double t_1 = sqrt((1.0 + z)) - sqrt(z);
                  	double t_2 = sqrt((y + 1.0)) - sqrt(y);
                  	double t_3 = sqrt((1.0 + t)) - sqrt(t);
                  	double tmp;
                  	if (t_2 <= 2e-7) {
                  		tmp = t_3 + (t_1 + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))));
                  	} else {
                  		tmp = t_3 + (t_1 + (t_2 + (1.0 - sqrt(x))));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      t_1 = sqrt((1.0d0 + z)) - sqrt(z)
                      t_2 = sqrt((y + 1.0d0)) - sqrt(y)
                      t_3 = sqrt((1.0d0 + t)) - sqrt(t)
                      if (t_2 <= 2d-7) then
                          tmp = t_3 + (t_1 + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x))))))
                      else
                          tmp = t_3 + (t_1 + (t_2 + (1.0d0 - sqrt(x))))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double t_1 = Math.sqrt((1.0 + z)) - Math.sqrt(z);
                  	double t_2 = Math.sqrt((y + 1.0)) - Math.sqrt(y);
                  	double t_3 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
                  	double tmp;
                  	if (t_2 <= 2e-7) {
                  		tmp = t_3 + (t_1 + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x))))));
                  	} else {
                  		tmp = t_3 + (t_1 + (t_2 + (1.0 - Math.sqrt(x))));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	t_1 = math.sqrt((1.0 + z)) - math.sqrt(z)
                  	t_2 = math.sqrt((y + 1.0)) - math.sqrt(y)
                  	t_3 = math.sqrt((1.0 + t)) - math.sqrt(t)
                  	tmp = 0
                  	if t_2 <= 2e-7:
                  		tmp = t_3 + (t_1 + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + math.sqrt((1.0 + x))))))
                  	else:
                  		tmp = t_3 + (t_1 + (t_2 + (1.0 - math.sqrt(x))))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	t_1 = Float64(sqrt(Float64(1.0 + z)) - sqrt(z))
                  	t_2 = Float64(sqrt(Float64(y + 1.0)) - sqrt(y))
                  	t_3 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t))
                  	tmp = 0.0
                  	if (t_2 <= 2e-7)
                  		tmp = Float64(t_3 + Float64(t_1 + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))))));
                  	else
                  		tmp = Float64(t_3 + Float64(t_1 + Float64(t_2 + Float64(1.0 - sqrt(x)))));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	t_1 = sqrt((1.0 + z)) - sqrt(z);
                  	t_2 = sqrt((y + 1.0)) - sqrt(y);
                  	t_3 = sqrt((1.0 + t)) - sqrt(t);
                  	tmp = 0.0;
                  	if (t_2 <= 2e-7)
                  		tmp = t_3 + (t_1 + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))));
                  	else
                  		tmp = t_3 + (t_1 + (t_2 + (1.0 - sqrt(x))));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e-7], N[(t$95$3 + N[(t$95$1 + N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 + N[(t$95$1 + N[(t$95$2 + N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  t_1 := \sqrt{1 + z} - \sqrt{z}\\
                  t_2 := \sqrt{y + 1} - \sqrt{y}\\
                  t_3 := \sqrt{1 + t} - \sqrt{t}\\
                  \mathbf{if}\;t\_2 \leq 2 \cdot 10^{-7}:\\
                  \;\;\;\;t\_3 + \left(t\_1 + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_3 + \left(t\_1 + \left(t\_2 + \left(1 - \sqrt{x}\right)\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y)) < 1.9999999999999999e-7

                    1. Initial program 83.2%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. flip--83.4%

                        \[\leadsto \left(\left(\color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      2. div-inv83.4%

                        \[\leadsto \left(\left(\color{blue}{\left(\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}\right) \cdot \frac{1}{\sqrt{x + 1} + \sqrt{x}}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      3. add-sqr-sqrt65.9%

                        \[\leadsto \left(\left(\left(\color{blue}{\left(x + 1\right)} - \sqrt{x} \cdot \sqrt{x}\right) \cdot \frac{1}{\sqrt{x + 1} + \sqrt{x}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      4. +-commutative65.9%

                        \[\leadsto \left(\left(\left(\color{blue}{\left(1 + x\right)} - \sqrt{x} \cdot \sqrt{x}\right) \cdot \frac{1}{\sqrt{x + 1} + \sqrt{x}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      5. add-sqr-sqrt83.7%

                        \[\leadsto \left(\left(\left(\left(1 + x\right) - \color{blue}{x}\right) \cdot \frac{1}{\sqrt{x + 1} + \sqrt{x}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      6. +-commutative83.7%

                        \[\leadsto \left(\left(\left(\left(1 + x\right) - x\right) \cdot \frac{1}{\sqrt{\color{blue}{1 + x}} + \sqrt{x}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    4. Applied egg-rr83.7%

                      \[\leadsto \left(\left(\color{blue}{\left(\left(1 + x\right) - x\right) \cdot \frac{1}{\sqrt{1 + x} + \sqrt{x}}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    5. Step-by-step derivation
                      1. associate-*r/83.7%

                        \[\leadsto \left(\left(\color{blue}{\frac{\left(\left(1 + x\right) - x\right) \cdot 1}{\sqrt{1 + x} + \sqrt{x}}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      2. *-rgt-identity83.7%

                        \[\leadsto \left(\left(\frac{\color{blue}{\left(1 + x\right) - x}}{\sqrt{1 + x} + \sqrt{x}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      3. associate--l+86.6%

                        \[\leadsto \left(\left(\frac{\color{blue}{1 + \left(x - x\right)}}{\sqrt{1 + x} + \sqrt{x}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      4. +-inverses86.6%

                        \[\leadsto \left(\left(\frac{1 + \color{blue}{0}}{\sqrt{1 + x} + \sqrt{x}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      5. metadata-eval86.6%

                        \[\leadsto \left(\left(\frac{\color{blue}{1}}{\sqrt{1 + x} + \sqrt{x}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      6. +-commutative86.6%

                        \[\leadsto \left(\left(\frac{1}{\color{blue}{\sqrt{x} + \sqrt{1 + x}}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    6. Simplified86.6%

                      \[\leadsto \left(\left(\color{blue}{\frac{1}{\sqrt{x} + \sqrt{1 + x}}} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    7. Taylor expanded in y around inf 91.8%

                      \[\leadsto \left(\left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \color{blue}{0.5 \cdot \sqrt{\frac{1}{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]

                    if 1.9999999999999999e-7 < (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))

                    1. Initial program 97.4%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0 49.7%

                      \[\leadsto \left(\left(\color{blue}{\left(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) \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification70.3%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{y + 1} - \sqrt{y} \leq 2 \cdot 10^{-7}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 9: 91.3% accurate, 1.0× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{1 + z}\\ \mathbf{if}\;t\_1 - \sqrt{z} \leq 0.0001:\\ \;\;\;\;\sqrt{1 + x} + \left(\left(\sqrt{y + 1} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(t\_1 + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (let* ((t_1 (sqrt (+ 1.0 z))))
                     (if (<= (- t_1 (sqrt z)) 0.0001)
                       (+
                        (sqrt (+ 1.0 x))
                        (- (+ (sqrt (+ y 1.0)) (* 0.5 (sqrt (/ 1.0 z)))) (+ (sqrt y) (sqrt x))))
                       (+
                        (- (sqrt (+ 1.0 t)) (sqrt t))
                        (- (+ t_1 2.0) (+ (sqrt x) (+ (sqrt y) (sqrt z))))))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double t_1 = sqrt((1.0 + z));
                  	double tmp;
                  	if ((t_1 - sqrt(z)) <= 0.0001) {
                  		tmp = sqrt((1.0 + x)) + ((sqrt((y + 1.0)) + (0.5 * sqrt((1.0 / z)))) - (sqrt(y) + sqrt(x)));
                  	} else {
                  		tmp = (sqrt((1.0 + t)) - sqrt(t)) + ((t_1 + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z))));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      t_1 = sqrt((1.0d0 + z))
                      if ((t_1 - sqrt(z)) <= 0.0001d0) then
                          tmp = sqrt((1.0d0 + x)) + ((sqrt((y + 1.0d0)) + (0.5d0 * sqrt((1.0d0 / z)))) - (sqrt(y) + sqrt(x)))
                      else
                          tmp = (sqrt((1.0d0 + t)) - sqrt(t)) + ((t_1 + 2.0d0) - (sqrt(x) + (sqrt(y) + sqrt(z))))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double t_1 = Math.sqrt((1.0 + z));
                  	double tmp;
                  	if ((t_1 - Math.sqrt(z)) <= 0.0001) {
                  		tmp = Math.sqrt((1.0 + x)) + ((Math.sqrt((y + 1.0)) + (0.5 * Math.sqrt((1.0 / z)))) - (Math.sqrt(y) + Math.sqrt(x)));
                  	} else {
                  		tmp = (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + ((t_1 + 2.0) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z))));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	t_1 = math.sqrt((1.0 + z))
                  	tmp = 0
                  	if (t_1 - math.sqrt(z)) <= 0.0001:
                  		tmp = math.sqrt((1.0 + x)) + ((math.sqrt((y + 1.0)) + (0.5 * math.sqrt((1.0 / z)))) - (math.sqrt(y) + math.sqrt(x)))
                  	else:
                  		tmp = (math.sqrt((1.0 + t)) - math.sqrt(t)) + ((t_1 + 2.0) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	t_1 = sqrt(Float64(1.0 + z))
                  	tmp = 0.0
                  	if (Float64(t_1 - sqrt(z)) <= 0.0001)
                  		tmp = Float64(sqrt(Float64(1.0 + x)) + Float64(Float64(sqrt(Float64(y + 1.0)) + Float64(0.5 * sqrt(Float64(1.0 / z)))) - Float64(sqrt(y) + sqrt(x))));
                  	else
                  		tmp = Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(Float64(t_1 + 2.0) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	t_1 = sqrt((1.0 + z));
                  	tmp = 0.0;
                  	if ((t_1 - sqrt(z)) <= 0.0001)
                  		tmp = sqrt((1.0 + x)) + ((sqrt((y + 1.0)) + (0.5 * sqrt((1.0 / z)))) - (sqrt(y) + sqrt(x)));
                  	else
                  		tmp = (sqrt((1.0 + t)) - sqrt(t)) + ((t_1 + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z))));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$1 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision], 0.0001], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 + 2.0), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  t_1 := \sqrt{1 + z}\\
                  \mathbf{if}\;t\_1 - \sqrt{z} \leq 0.0001:\\
                  \;\;\;\;\sqrt{1 + x} + \left(\left(\sqrt{y + 1} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(t\_1 + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)) < 1.00000000000000005e-4

                    1. Initial program 83.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 3.9%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+15.4%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative15.4%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified15.4%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in z around inf 30.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(\left(\sqrt{1 + y} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right)} \]

                    if 1.00000000000000005e-4 < (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))

                    1. Initial program 96.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0 28.5%

                      \[\leadsto \color{blue}{\left(\left(1 + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    4. Step-by-step derivation
                      1. associate--l+36.8%

                        \[\leadsto \color{blue}{\left(1 + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      2. +-commutative36.8%

                        \[\leadsto \left(1 + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    5. Simplified36.8%

                      \[\leadsto \color{blue}{\left(1 + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    6. Taylor expanded in y around 0 21.4%

                      \[\leadsto \color{blue}{\left(\left(2 + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification25.9%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{1 + z} - \sqrt{z} \leq 0.0001:\\ \;\;\;\;\sqrt{1 + x} + \left(\left(\sqrt{y + 1} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 10: 85.8% accurate, 1.1× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{y + 1}\\ t_2 := \sqrt{1 + z}\\ \mathbf{if}\;t\_2 - \sqrt{z} \leq 2 \cdot 10^{-7}:\\ \;\;\;\;\sqrt{1 + x} + \left(\left(t\_1 + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(t\_1 + t\_2\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (let* ((t_1 (sqrt (+ y 1.0))) (t_2 (sqrt (+ 1.0 z))))
                     (if (<= (- t_2 (sqrt z)) 2e-7)
                       (+
                        (sqrt (+ 1.0 x))
                        (- (+ t_1 (* 0.5 (sqrt (/ 1.0 z)))) (+ (sqrt y) (sqrt x))))
                       (- (+ 1.0 (+ t_1 t_2)) (+ (sqrt x) (+ (sqrt y) (sqrt z)))))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double t_1 = sqrt((y + 1.0));
                  	double t_2 = sqrt((1.0 + z));
                  	double tmp;
                  	if ((t_2 - sqrt(z)) <= 2e-7) {
                  		tmp = sqrt((1.0 + x)) + ((t_1 + (0.5 * sqrt((1.0 / z)))) - (sqrt(y) + sqrt(x)));
                  	} else {
                  		tmp = (1.0 + (t_1 + t_2)) - (sqrt(x) + (sqrt(y) + sqrt(z)));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      t_1 = sqrt((y + 1.0d0))
                      t_2 = sqrt((1.0d0 + z))
                      if ((t_2 - sqrt(z)) <= 2d-7) then
                          tmp = sqrt((1.0d0 + x)) + ((t_1 + (0.5d0 * sqrt((1.0d0 / z)))) - (sqrt(y) + sqrt(x)))
                      else
                          tmp = (1.0d0 + (t_1 + t_2)) - (sqrt(x) + (sqrt(y) + sqrt(z)))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double t_1 = Math.sqrt((y + 1.0));
                  	double t_2 = Math.sqrt((1.0 + z));
                  	double tmp;
                  	if ((t_2 - Math.sqrt(z)) <= 2e-7) {
                  		tmp = Math.sqrt((1.0 + x)) + ((t_1 + (0.5 * Math.sqrt((1.0 / z)))) - (Math.sqrt(y) + Math.sqrt(x)));
                  	} else {
                  		tmp = (1.0 + (t_1 + t_2)) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	t_1 = math.sqrt((y + 1.0))
                  	t_2 = math.sqrt((1.0 + z))
                  	tmp = 0
                  	if (t_2 - math.sqrt(z)) <= 2e-7:
                  		tmp = math.sqrt((1.0 + x)) + ((t_1 + (0.5 * math.sqrt((1.0 / z)))) - (math.sqrt(y) + math.sqrt(x)))
                  	else:
                  		tmp = (1.0 + (t_1 + t_2)) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z)))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	t_1 = sqrt(Float64(y + 1.0))
                  	t_2 = sqrt(Float64(1.0 + z))
                  	tmp = 0.0
                  	if (Float64(t_2 - sqrt(z)) <= 2e-7)
                  		tmp = Float64(sqrt(Float64(1.0 + x)) + Float64(Float64(t_1 + Float64(0.5 * sqrt(Float64(1.0 / z)))) - Float64(sqrt(y) + sqrt(x))));
                  	else
                  		tmp = Float64(Float64(1.0 + Float64(t_1 + t_2)) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z))));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	t_1 = sqrt((y + 1.0));
                  	t_2 = sqrt((1.0 + z));
                  	tmp = 0.0;
                  	if ((t_2 - sqrt(z)) <= 2e-7)
                  		tmp = sqrt((1.0 + x)) + ((t_1 + (0.5 * sqrt((1.0 / z)))) - (sqrt(y) + sqrt(x)));
                  	else
                  		tmp = (1.0 + (t_1 + t_2)) - (sqrt(x) + (sqrt(y) + sqrt(z)));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision], 2e-7], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[(N[(t$95$1 + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  t_1 := \sqrt{y + 1}\\
                  t_2 := \sqrt{1 + z}\\
                  \mathbf{if}\;t\_2 - \sqrt{z} \leq 2 \cdot 10^{-7}:\\
                  \;\;\;\;\sqrt{1 + x} + \left(\left(t\_1 + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(1 + \left(t\_1 + t\_2\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)) < 1.9999999999999999e-7

                    1. Initial program 84.4%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 3.9%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+15.6%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative15.6%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified15.6%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in z around inf 31.1%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(\left(\sqrt{1 + y} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right)} \]

                    if 1.9999999999999999e-7 < (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))

                    1. Initial program 96.0%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 14.9%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+18.3%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative18.3%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified18.3%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around 0 12.0%

                      \[\leadsto \color{blue}{\left(1 + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification21.2%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{1 + z} - \sqrt{z} \leq 2 \cdot 10^{-7}:\\ \;\;\;\;\sqrt{1 + x} + \left(\left(\sqrt{y + 1} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(\sqrt{y + 1} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 11: 91.0% accurate, 1.3× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{1 + z}\\ \mathbf{if}\;t \leq 1100:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(t\_1 + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t\_1 - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\right)\right)\right) + 0.5 \cdot \sqrt{\frac{1}{t}}\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (let* ((t_1 (sqrt (+ 1.0 z))))
                     (if (<= t 1100.0)
                       (+
                        (- (sqrt (+ 1.0 t)) (sqrt t))
                        (- (+ t_1 2.0) (+ (sqrt x) (+ (sqrt y) (sqrt z)))))
                       (+
                        (+
                         (- t_1 (sqrt z))
                         (+
                          (- (sqrt (+ y 1.0)) (sqrt y))
                          (+ 1.0 (- (* x (+ 0.5 (* x -0.125))) (sqrt x)))))
                        (* 0.5 (sqrt (/ 1.0 t)))))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double t_1 = sqrt((1.0 + z));
                  	double tmp;
                  	if (t <= 1100.0) {
                  		tmp = (sqrt((1.0 + t)) - sqrt(t)) + ((t_1 + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z))));
                  	} else {
                  		tmp = ((t_1 - sqrt(z)) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))))) + (0.5 * sqrt((1.0 / t)));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      t_1 = sqrt((1.0d0 + z))
                      if (t <= 1100.0d0) then
                          tmp = (sqrt((1.0d0 + t)) - sqrt(t)) + ((t_1 + 2.0d0) - (sqrt(x) + (sqrt(y) + sqrt(z))))
                      else
                          tmp = ((t_1 - sqrt(z)) + ((sqrt((y + 1.0d0)) - sqrt(y)) + (1.0d0 + ((x * (0.5d0 + (x * (-0.125d0)))) - sqrt(x))))) + (0.5d0 * sqrt((1.0d0 / t)))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double t_1 = Math.sqrt((1.0 + z));
                  	double tmp;
                  	if (t <= 1100.0) {
                  		tmp = (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + ((t_1 + 2.0) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z))));
                  	} else {
                  		tmp = ((t_1 - Math.sqrt(z)) + ((Math.sqrt((y + 1.0)) - Math.sqrt(y)) + (1.0 + ((x * (0.5 + (x * -0.125))) - Math.sqrt(x))))) + (0.5 * Math.sqrt((1.0 / t)));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	t_1 = math.sqrt((1.0 + z))
                  	tmp = 0
                  	if t <= 1100.0:
                  		tmp = (math.sqrt((1.0 + t)) - math.sqrt(t)) + ((t_1 + 2.0) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))))
                  	else:
                  		tmp = ((t_1 - math.sqrt(z)) + ((math.sqrt((y + 1.0)) - math.sqrt(y)) + (1.0 + ((x * (0.5 + (x * -0.125))) - math.sqrt(x))))) + (0.5 * math.sqrt((1.0 / t)))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	t_1 = sqrt(Float64(1.0 + z))
                  	tmp = 0.0
                  	if (t <= 1100.0)
                  		tmp = Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(Float64(t_1 + 2.0) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))));
                  	else
                  		tmp = Float64(Float64(Float64(t_1 - sqrt(z)) + Float64(Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) + Float64(1.0 + Float64(Float64(x * Float64(0.5 + Float64(x * -0.125))) - sqrt(x))))) + Float64(0.5 * sqrt(Float64(1.0 / t))));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	t_1 = sqrt((1.0 + z));
                  	tmp = 0.0;
                  	if (t <= 1100.0)
                  		tmp = (sqrt((1.0 + t)) - sqrt(t)) + ((t_1 + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z))));
                  	else
                  		tmp = ((t_1 - sqrt(z)) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))))) + (0.5 * sqrt((1.0 / t)));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1100.0], N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 + 2.0), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$1 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(N[(x * N[(0.5 + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  t_1 := \sqrt{1 + z}\\
                  \mathbf{if}\;t \leq 1100:\\
                  \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(t\_1 + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(\left(t\_1 - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\right)\right)\right) + 0.5 \cdot \sqrt{\frac{1}{t}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if t < 1100

                    1. Initial program 97.5%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0 33.5%

                      \[\leadsto \color{blue}{\left(\left(1 + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    4. Step-by-step derivation
                      1. associate--l+38.6%

                        \[\leadsto \color{blue}{\left(1 + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                      2. +-commutative38.6%

                        \[\leadsto \left(1 + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    5. Simplified38.6%

                      \[\leadsto \color{blue}{\left(1 + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
                    6. Taylor expanded in y around 0 21.6%

                      \[\leadsto \color{blue}{\left(\left(2 + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]

                    if 1100 < t

                    1. Initial program 83.0%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 85.0%

                      \[\leadsto \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) + \color{blue}{0.5 \cdot \sqrt{\frac{1}{t}}} \]
                    4. Taylor expanded in x around 0 44.5%

                      \[\leadsto \left(\left(\color{blue}{\left(\left(1 + x \cdot \left(0.5 + -0.125 \cdot x\right)\right) - \sqrt{x}\right)} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + 0.5 \cdot \sqrt{\frac{1}{t}} \]
                    5. Step-by-step derivation
                      1. associate--l+44.5%

                        \[\leadsto \left(\left(\color{blue}{\left(1 + \left(x \cdot \left(0.5 + -0.125 \cdot x\right) - \sqrt{x}\right)\right)} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + 0.5 \cdot \sqrt{\frac{1}{t}} \]
                    6. Simplified44.5%

                      \[\leadsto \left(\left(\color{blue}{\left(1 + \left(x \cdot \left(0.5 + -0.125 \cdot x\right) - \sqrt{x}\right)\right)} + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + 0.5 \cdot \sqrt{\frac{1}{t}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification32.7%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1100:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\right)\right)\right) + 0.5 \cdot \sqrt{\frac{1}{t}}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 12: 85.9% accurate, 1.6× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{y + 1}\\ \mathbf{if}\;z \leq 26000000:\\ \;\;\;\;\left(1 + \left(t\_1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\left(t\_1 + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (let* ((t_1 (sqrt (+ y 1.0))))
                     (if (<= z 26000000.0)
                       (- (+ 1.0 (+ t_1 (sqrt (+ 1.0 z)))) (+ (sqrt x) (+ (sqrt y) (sqrt z))))
                       (+ 1.0 (- (+ t_1 (* 0.5 (sqrt (/ 1.0 z)))) (+ (sqrt y) (sqrt x)))))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double t_1 = sqrt((y + 1.0));
                  	double tmp;
                  	if (z <= 26000000.0) {
                  		tmp = (1.0 + (t_1 + sqrt((1.0 + z)))) - (sqrt(x) + (sqrt(y) + sqrt(z)));
                  	} else {
                  		tmp = 1.0 + ((t_1 + (0.5 * sqrt((1.0 / z)))) - (sqrt(y) + sqrt(x)));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      t_1 = sqrt((y + 1.0d0))
                      if (z <= 26000000.0d0) then
                          tmp = (1.0d0 + (t_1 + sqrt((1.0d0 + z)))) - (sqrt(x) + (sqrt(y) + sqrt(z)))
                      else
                          tmp = 1.0d0 + ((t_1 + (0.5d0 * sqrt((1.0d0 / z)))) - (sqrt(y) + sqrt(x)))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double t_1 = Math.sqrt((y + 1.0));
                  	double tmp;
                  	if (z <= 26000000.0) {
                  		tmp = (1.0 + (t_1 + Math.sqrt((1.0 + z)))) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)));
                  	} else {
                  		tmp = 1.0 + ((t_1 + (0.5 * Math.sqrt((1.0 / z)))) - (Math.sqrt(y) + Math.sqrt(x)));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	t_1 = math.sqrt((y + 1.0))
                  	tmp = 0
                  	if z <= 26000000.0:
                  		tmp = (1.0 + (t_1 + math.sqrt((1.0 + z)))) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z)))
                  	else:
                  		tmp = 1.0 + ((t_1 + (0.5 * math.sqrt((1.0 / z)))) - (math.sqrt(y) + math.sqrt(x)))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	t_1 = sqrt(Float64(y + 1.0))
                  	tmp = 0.0
                  	if (z <= 26000000.0)
                  		tmp = Float64(Float64(1.0 + Float64(t_1 + sqrt(Float64(1.0 + z)))) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z))));
                  	else
                  		tmp = Float64(1.0 + Float64(Float64(t_1 + Float64(0.5 * sqrt(Float64(1.0 / z)))) - Float64(sqrt(y) + sqrt(x))));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	t_1 = sqrt((y + 1.0));
                  	tmp = 0.0;
                  	if (z <= 26000000.0)
                  		tmp = (1.0 + (t_1 + sqrt((1.0 + z)))) - (sqrt(x) + (sqrt(y) + sqrt(z)));
                  	else
                  		tmp = 1.0 + ((t_1 + (0.5 * sqrt((1.0 / z)))) - (sqrt(y) + sqrt(x)));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, 26000000.0], N[(N[(1.0 + N[(t$95$1 + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(t$95$1 + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  t_1 := \sqrt{y + 1}\\
                  \mathbf{if}\;z \leq 26000000:\\
                  \;\;\;\;\left(1 + \left(t\_1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;1 + \left(\left(t\_1 + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < 2.6e7

                    1. Initial program 96.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.1%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+18.5%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative18.5%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified18.5%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around 0 12.2%

                      \[\leadsto \color{blue}{\left(1 + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]

                    if 2.6e7 < z

                    1. Initial program 83.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 3.9%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+15.4%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative15.4%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified15.4%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around 0 27.4%

                      \[\leadsto \color{blue}{1} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right) \]
                    7. Taylor expanded in z around inf 34.8%

                      \[\leadsto 1 + \color{blue}{\left(\left(\sqrt{1 + y} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification23.2%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 26000000:\\ \;\;\;\;\left(1 + \left(\sqrt{y + 1} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\left(\sqrt{y + 1} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 13: 85.7% accurate, 2.0× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 280000:\\ \;\;\;\;\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\left(\sqrt{y + 1} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= z 280000.0)
                     (- (+ (sqrt (+ 1.0 z)) 2.0) (+ (sqrt x) (+ (sqrt y) (sqrt z))))
                     (+
                      1.0
                      (- (+ (sqrt (+ y 1.0)) (* 0.5 (sqrt (/ 1.0 z)))) (+ (sqrt y) (sqrt x))))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (z <= 280000.0) {
                  		tmp = (sqrt((1.0 + z)) + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z)));
                  	} else {
                  		tmp = 1.0 + ((sqrt((y + 1.0)) + (0.5 * sqrt((1.0 / z)))) - (sqrt(y) + sqrt(x)));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      if (z <= 280000.0d0) then
                          tmp = (sqrt((1.0d0 + z)) + 2.0d0) - (sqrt(x) + (sqrt(y) + sqrt(z)))
                      else
                          tmp = 1.0d0 + ((sqrt((y + 1.0d0)) + (0.5d0 * sqrt((1.0d0 / z)))) - (sqrt(y) + sqrt(x)))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (z <= 280000.0) {
                  		tmp = (Math.sqrt((1.0 + z)) + 2.0) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)));
                  	} else {
                  		tmp = 1.0 + ((Math.sqrt((y + 1.0)) + (0.5 * Math.sqrt((1.0 / z)))) - (Math.sqrt(y) + Math.sqrt(x)));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if z <= 280000.0:
                  		tmp = (math.sqrt((1.0 + z)) + 2.0) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z)))
                  	else:
                  		tmp = 1.0 + ((math.sqrt((y + 1.0)) + (0.5 * math.sqrt((1.0 / z)))) - (math.sqrt(y) + math.sqrt(x)))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (z <= 280000.0)
                  		tmp = Float64(Float64(sqrt(Float64(1.0 + z)) + 2.0) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z))));
                  	else
                  		tmp = Float64(1.0 + Float64(Float64(sqrt(Float64(y + 1.0)) + Float64(0.5 * sqrt(Float64(1.0 / z)))) - Float64(sqrt(y) + sqrt(x))));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (z <= 280000.0)
                  		tmp = (sqrt((1.0 + z)) + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z)));
                  	else
                  		tmp = 1.0 + ((sqrt((y + 1.0)) + (0.5 * sqrt((1.0 / z)))) - (sqrt(y) + sqrt(x)));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[z, 280000.0], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + 2.0), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq 280000:\\
                  \;\;\;\;\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;1 + \left(\left(\sqrt{y + 1} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < 2.8e5

                    1. Initial program 96.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.1%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+18.5%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative18.5%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified18.5%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around 0 21.0%

                      \[\leadsto \color{blue}{1} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right) \]
                    7. Taylor expanded in y around 0 9.8%

                      \[\leadsto \color{blue}{\left(2 + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]

                    if 2.8e5 < z

                    1. Initial program 83.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 3.9%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+15.4%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative15.4%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified15.4%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around 0 27.4%

                      \[\leadsto \color{blue}{1} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right) \]
                    7. Taylor expanded in z around inf 34.8%

                      \[\leadsto 1 + \color{blue}{\left(\left(\sqrt{1 + y} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification22.0%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 280000:\\ \;\;\;\;\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\left(\sqrt{y + 1} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 14: 84.4% accurate, 2.0× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 25500000:\\ \;\;\;\;\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 + x} + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= z 25500000.0)
                     (- (+ (sqrt (+ 1.0 z)) 2.0) (+ (sqrt x) (+ (sqrt y) (sqrt z))))
                     (+ (sqrt (+ 1.0 x)) (- (sqrt (+ y 1.0)) (+ (sqrt y) (sqrt x))))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (z <= 25500000.0) {
                  		tmp = (sqrt((1.0 + z)) + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z)));
                  	} else {
                  		tmp = sqrt((1.0 + x)) + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      if (z <= 25500000.0d0) then
                          tmp = (sqrt((1.0d0 + z)) + 2.0d0) - (sqrt(x) + (sqrt(y) + sqrt(z)))
                      else
                          tmp = sqrt((1.0d0 + x)) + (sqrt((y + 1.0d0)) - (sqrt(y) + sqrt(x)))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (z <= 25500000.0) {
                  		tmp = (Math.sqrt((1.0 + z)) + 2.0) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)));
                  	} else {
                  		tmp = Math.sqrt((1.0 + x)) + (Math.sqrt((y + 1.0)) - (Math.sqrt(y) + Math.sqrt(x)));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if z <= 25500000.0:
                  		tmp = (math.sqrt((1.0 + z)) + 2.0) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z)))
                  	else:
                  		tmp = math.sqrt((1.0 + x)) + (math.sqrt((y + 1.0)) - (math.sqrt(y) + math.sqrt(x)))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (z <= 25500000.0)
                  		tmp = Float64(Float64(sqrt(Float64(1.0 + z)) + 2.0) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z))));
                  	else
                  		tmp = Float64(sqrt(Float64(1.0 + x)) + Float64(sqrt(Float64(y + 1.0)) - Float64(sqrt(y) + sqrt(x))));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (z <= 25500000.0)
                  		tmp = (sqrt((1.0 + z)) + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z)));
                  	else
                  		tmp = sqrt((1.0 + x)) + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[z, 25500000.0], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + 2.0), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq 25500000:\\
                  \;\;\;\;\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\sqrt{1 + x} + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < 2.55e7

                    1. Initial program 96.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.1%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+18.5%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative18.5%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified18.5%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around 0 21.0%

                      \[\leadsto \color{blue}{1} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right) \]
                    7. Taylor expanded in y around 0 9.8%

                      \[\leadsto \color{blue}{\left(2 + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]

                    if 2.55e7 < z

                    1. Initial program 83.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 3.9%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+15.4%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative15.4%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified15.4%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in z around inf 30.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(\sqrt{1 + y} - \left(\sqrt{x} + \sqrt{y}\right)\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification19.9%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 25500000:\\ \;\;\;\;\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 + x} + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 15: 69.1% accurate, 2.6× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;1 + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= x 1.0)
                     (+ 1.0 (- (sqrt (+ y 1.0)) (+ (sqrt y) (sqrt x))))
                     (/ (+ (* -0.125 (sqrt (/ 1.0 x))) (* (sqrt x) 0.5)) x)))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 1.0) {
                  		tmp = 1.0 + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)));
                  	} else {
                  		tmp = ((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / x;
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      if (x <= 1.0d0) then
                          tmp = 1.0d0 + (sqrt((y + 1.0d0)) - (sqrt(y) + sqrt(x)))
                      else
                          tmp = (((-0.125d0) * sqrt((1.0d0 / x))) + (sqrt(x) * 0.5d0)) / x
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 1.0) {
                  		tmp = 1.0 + (Math.sqrt((y + 1.0)) - (Math.sqrt(y) + Math.sqrt(x)));
                  	} else {
                  		tmp = ((-0.125 * Math.sqrt((1.0 / x))) + (Math.sqrt(x) * 0.5)) / x;
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if x <= 1.0:
                  		tmp = 1.0 + (math.sqrt((y + 1.0)) - (math.sqrt(y) + math.sqrt(x)))
                  	else:
                  		tmp = ((-0.125 * math.sqrt((1.0 / x))) + (math.sqrt(x) * 0.5)) / x
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (x <= 1.0)
                  		tmp = Float64(1.0 + Float64(sqrt(Float64(y + 1.0)) - Float64(sqrt(y) + sqrt(x))));
                  	else
                  		tmp = Float64(Float64(Float64(-0.125 * sqrt(Float64(1.0 / x))) + Float64(sqrt(x) * 0.5)) / x);
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (x <= 1.0)
                  		tmp = 1.0 + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)));
                  	else
                  		tmp = ((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / x;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[x, 1.0], N[(1.0 + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.125 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[x], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 1:\\
                  \;\;\;\;1 + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 1

                    1. Initial program 98.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.4%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+29.9%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative29.9%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified29.9%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around 0 29.4%

                      \[\leadsto \color{blue}{1} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right) \]
                    7. Taylor expanded in z around inf 38.6%

                      \[\leadsto 1 + \color{blue}{\left(\sqrt{1 + y} - \left(\sqrt{x} + \sqrt{y}\right)\right)} \]

                    if 1 < x

                    1. Initial program 84.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 4.8%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+6.2%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative6.2%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified6.2%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg4.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around inf 9.7%

                      \[\leadsto \color{blue}{\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + 0.5 \cdot \sqrt{x}}{x}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification23.0%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;1 + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 16: 40.3% accurate, 2.7× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 110000:\\ \;\;\;\;\mathsf{hypot}\left(1, \sqrt{x}\right) - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= x 110000.0)
                     (- (hypot 1.0 (sqrt x)) (sqrt x))
                     (/ (+ (* -0.125 (sqrt (/ 1.0 x))) (* (sqrt x) 0.5)) x)))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 110000.0) {
                  		tmp = hypot(1.0, sqrt(x)) - sqrt(x);
                  	} else {
                  		tmp = ((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / x;
                  	}
                  	return tmp;
                  }
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 110000.0) {
                  		tmp = Math.hypot(1.0, Math.sqrt(x)) - Math.sqrt(x);
                  	} else {
                  		tmp = ((-0.125 * Math.sqrt((1.0 / x))) + (Math.sqrt(x) * 0.5)) / x;
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if x <= 110000.0:
                  		tmp = math.hypot(1.0, math.sqrt(x)) - math.sqrt(x)
                  	else:
                  		tmp = ((-0.125 * math.sqrt((1.0 / x))) + (math.sqrt(x) * 0.5)) / x
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (x <= 110000.0)
                  		tmp = Float64(hypot(1.0, sqrt(x)) - sqrt(x));
                  	else
                  		tmp = Float64(Float64(Float64(-0.125 * sqrt(Float64(1.0 / x))) + Float64(sqrt(x) * 0.5)) / x);
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (x <= 110000.0)
                  		tmp = hypot(1.0, sqrt(x)) - sqrt(x);
                  	else
                  		tmp = ((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / x;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[x, 110000.0], N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[x], $MachinePrecision] ^ 2], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.125 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[x], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 110000:\\
                  \;\;\;\;\mathsf{hypot}\left(1, \sqrt{x}\right) - \sqrt{x}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 1.1e5

                    1. Initial program 97.9%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.2%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+29.5%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative29.5%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified29.5%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 23.0%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg23.0%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified23.0%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Step-by-step derivation
                      1. add-sqr-sqrt23.0%

                        \[\leadsto \sqrt{1 + \color{blue}{\sqrt{x} \cdot \sqrt{x}}} + \left(-\sqrt{x}\right) \]
                      2. hypot-1-def23.0%

                        \[\leadsto \color{blue}{\mathsf{hypot}\left(1, \sqrt{x}\right)} + \left(-\sqrt{x}\right) \]
                    10. Applied egg-rr23.0%

                      \[\leadsto \color{blue}{\mathsf{hypot}\left(1, \sqrt{x}\right)} + \left(-\sqrt{x}\right) \]

                    if 1.1e5 < x

                    1. Initial program 83.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 4.7%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+5.9%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative5.9%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified5.9%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 3.8%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg3.8%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified3.8%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around inf 9.5%

                      \[\leadsto \color{blue}{\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + 0.5 \cdot \sqrt{x}}{x}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification15.9%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 110000:\\ \;\;\;\;\mathsf{hypot}\left(1, \sqrt{x}\right) - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 17: 40.3% accurate, 3.8× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 110000:\\ \;\;\;\;\sqrt{1 + x} - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= x 110000.0)
                     (- (sqrt (+ 1.0 x)) (sqrt x))
                     (/ (+ (* -0.125 (sqrt (/ 1.0 x))) (* (sqrt x) 0.5)) x)))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 110000.0) {
                  		tmp = sqrt((1.0 + x)) - sqrt(x);
                  	} else {
                  		tmp = ((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / x;
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      if (x <= 110000.0d0) then
                          tmp = sqrt((1.0d0 + x)) - sqrt(x)
                      else
                          tmp = (((-0.125d0) * sqrt((1.0d0 / x))) + (sqrt(x) * 0.5d0)) / x
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 110000.0) {
                  		tmp = Math.sqrt((1.0 + x)) - Math.sqrt(x);
                  	} else {
                  		tmp = ((-0.125 * Math.sqrt((1.0 / x))) + (Math.sqrt(x) * 0.5)) / x;
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if x <= 110000.0:
                  		tmp = math.sqrt((1.0 + x)) - math.sqrt(x)
                  	else:
                  		tmp = ((-0.125 * math.sqrt((1.0 / x))) + (math.sqrt(x) * 0.5)) / x
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (x <= 110000.0)
                  		tmp = Float64(sqrt(Float64(1.0 + x)) - sqrt(x));
                  	else
                  		tmp = Float64(Float64(Float64(-0.125 * sqrt(Float64(1.0 / x))) + Float64(sqrt(x) * 0.5)) / x);
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (x <= 110000.0)
                  		tmp = sqrt((1.0 + x)) - sqrt(x);
                  	else
                  		tmp = ((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / x;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[x, 110000.0], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.125 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[x], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 110000:\\
                  \;\;\;\;\sqrt{1 + x} - \sqrt{x}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 1.1e5

                    1. Initial program 97.9%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.2%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+29.5%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative29.5%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified29.5%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 23.0%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg23.0%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified23.0%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Step-by-step derivation
                      1. unsub-neg23.0%

                        \[\leadsto \color{blue}{\sqrt{1 + x} - \sqrt{x}} \]
                    10. Applied egg-rr23.0%

                      \[\leadsto \color{blue}{\sqrt{1 + x} - \sqrt{x}} \]

                    if 1.1e5 < x

                    1. Initial program 83.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 4.7%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+5.9%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative5.9%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified5.9%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 3.8%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg3.8%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified3.8%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around inf 9.5%

                      \[\leadsto \color{blue}{\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + 0.5 \cdot \sqrt{x}}{x}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification15.9%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 110000:\\ \;\;\;\;\sqrt{1 + x} - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 18: 40.2% accurate, 3.9× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 75000000:\\ \;\;\;\;\sqrt{1 + x} - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= x 75000000.0) (- (sqrt (+ 1.0 x)) (sqrt x)) (* 0.5 (sqrt (/ 1.0 x)))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 75000000.0) {
                  		tmp = sqrt((1.0 + x)) - sqrt(x);
                  	} else {
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      if (x <= 75000000.0d0) then
                          tmp = sqrt((1.0d0 + x)) - sqrt(x)
                      else
                          tmp = 0.5d0 * sqrt((1.0d0 / x))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 75000000.0) {
                  		tmp = Math.sqrt((1.0 + x)) - Math.sqrt(x);
                  	} else {
                  		tmp = 0.5 * Math.sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if x <= 75000000.0:
                  		tmp = math.sqrt((1.0 + x)) - math.sqrt(x)
                  	else:
                  		tmp = 0.5 * math.sqrt((1.0 / x))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (x <= 75000000.0)
                  		tmp = Float64(sqrt(Float64(1.0 + x)) - sqrt(x));
                  	else
                  		tmp = Float64(0.5 * sqrt(Float64(1.0 / x)));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (x <= 75000000.0)
                  		tmp = sqrt((1.0 + x)) - sqrt(x);
                  	else
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[x, 75000000.0], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 75000000:\\
                  \;\;\;\;\sqrt{1 + x} - \sqrt{x}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 7.5e7

                    1. Initial program 97.9%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.2%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+29.5%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative29.5%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified29.5%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 23.0%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg23.0%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified23.0%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Step-by-step derivation
                      1. unsub-neg23.0%

                        \[\leadsto \color{blue}{\sqrt{1 + x} - \sqrt{x}} \]
                    10. Applied egg-rr23.0%

                      \[\leadsto \color{blue}{\sqrt{1 + x} - \sqrt{x}} \]

                    if 7.5e7 < x

                    1. Initial program 83.8%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 4.7%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+5.9%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative5.9%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified5.9%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 3.8%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg3.8%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified3.8%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around inf 9.5%

                      \[\leadsto \color{blue}{0.5 \cdot \sqrt{\frac{1}{x}}} \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 19: 40.0% accurate, 6.9× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 1.32:\\ \;\;\;\;\left(1 + x \cdot \left(0.5 + x \cdot \left(x \cdot 0.0625 - 0.125\right)\right)\right) - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= x 1.32)
                     (- (+ 1.0 (* x (+ 0.5 (* x (- (* x 0.0625) 0.125))))) (sqrt x))
                     (* 0.5 (sqrt (/ 1.0 x)))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 1.32) {
                  		tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - sqrt(x);
                  	} else {
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      if (x <= 1.32d0) then
                          tmp = (1.0d0 + (x * (0.5d0 + (x * ((x * 0.0625d0) - 0.125d0))))) - sqrt(x)
                      else
                          tmp = 0.5d0 * sqrt((1.0d0 / x))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 1.32) {
                  		tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - Math.sqrt(x);
                  	} else {
                  		tmp = 0.5 * Math.sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if x <= 1.32:
                  		tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - math.sqrt(x)
                  	else:
                  		tmp = 0.5 * math.sqrt((1.0 / x))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (x <= 1.32)
                  		tmp = Float64(Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * Float64(Float64(x * 0.0625) - 0.125))))) - sqrt(x));
                  	else
                  		tmp = Float64(0.5 * sqrt(Float64(1.0 / x)));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (x <= 1.32)
                  		tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - sqrt(x);
                  	else
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[x, 1.32], N[(N[(1.0 + N[(x * N[(0.5 + N[(x * N[(N[(x * 0.0625), $MachinePrecision] - 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 1.32:\\
                  \;\;\;\;\left(1 + x \cdot \left(0.5 + x \cdot \left(x \cdot 0.0625 - 0.125\right)\right)\right) - \sqrt{x}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 1.32000000000000006

                    1. Initial program 98.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.4%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+29.9%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative29.9%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified29.9%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 22.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg22.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified22.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around 0 22.6%

                      \[\leadsto \color{blue}{\left(1 + x \cdot \left(0.5 + x \cdot \left(0.0625 \cdot x - 0.125\right)\right)\right) - \sqrt{x}} \]

                    if 1.32000000000000006 < x

                    1. Initial program 84.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 4.8%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+6.2%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative6.2%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified6.2%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg4.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around inf 9.7%

                      \[\leadsto \color{blue}{0.5 \cdot \sqrt{\frac{1}{x}}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification15.6%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.32:\\ \;\;\;\;\left(1 + x \cdot \left(0.5 + x \cdot \left(x \cdot 0.0625 - 0.125\right)\right)\right) - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 20: 39.9% accurate, 7.1× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 1.05:\\ \;\;\;\;1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= x 1.05)
                     (+ 1.0 (- (* x (+ 0.5 (* x -0.125))) (sqrt x)))
                     (* 0.5 (sqrt (/ 1.0 x)))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 1.05) {
                  		tmp = 1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x));
                  	} else {
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      if (x <= 1.05d0) then
                          tmp = 1.0d0 + ((x * (0.5d0 + (x * (-0.125d0)))) - sqrt(x))
                      else
                          tmp = 0.5d0 * sqrt((1.0d0 / x))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 1.05) {
                  		tmp = 1.0 + ((x * (0.5 + (x * -0.125))) - Math.sqrt(x));
                  	} else {
                  		tmp = 0.5 * Math.sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if x <= 1.05:
                  		tmp = 1.0 + ((x * (0.5 + (x * -0.125))) - math.sqrt(x))
                  	else:
                  		tmp = 0.5 * math.sqrt((1.0 / x))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (x <= 1.05)
                  		tmp = Float64(1.0 + Float64(Float64(x * Float64(0.5 + Float64(x * -0.125))) - sqrt(x)));
                  	else
                  		tmp = Float64(0.5 * sqrt(Float64(1.0 / x)));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (x <= 1.05)
                  		tmp = 1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x));
                  	else
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[x, 1.05], N[(1.0 + N[(N[(x * N[(0.5 + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 1.05:\\
                  \;\;\;\;1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 1.05000000000000004

                    1. Initial program 98.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.4%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+29.9%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative29.9%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified29.9%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 22.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg22.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified22.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around 0 22.6%

                      \[\leadsto \color{blue}{\left(1 + x \cdot \left(0.5 + -0.125 \cdot x\right)\right) - \sqrt{x}} \]
                    10. Step-by-step derivation
                      1. associate--l+22.6%

                        \[\leadsto \color{blue}{1 + \left(x \cdot \left(0.5 + -0.125 \cdot x\right) - \sqrt{x}\right)} \]
                    11. Simplified22.6%

                      \[\leadsto \color{blue}{1 + \left(x \cdot \left(0.5 + -0.125 \cdot x\right) - \sqrt{x}\right)} \]

                    if 1.05000000000000004 < x

                    1. Initial program 84.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 4.8%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+6.2%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative6.2%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified6.2%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg4.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around inf 9.7%

                      \[\leadsto \color{blue}{0.5 \cdot \sqrt{\frac{1}{x}}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification15.6%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.05:\\ \;\;\;\;1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 21: 39.9% accurate, 7.3× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\left(1 + x \cdot 0.5\right) - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= x 1.0) (- (+ 1.0 (* x 0.5)) (sqrt x)) (* 0.5 (sqrt (/ 1.0 x)))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 1.0) {
                  		tmp = (1.0 + (x * 0.5)) - sqrt(x);
                  	} else {
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      if (x <= 1.0d0) then
                          tmp = (1.0d0 + (x * 0.5d0)) - sqrt(x)
                      else
                          tmp = 0.5d0 * sqrt((1.0d0 / x))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 1.0) {
                  		tmp = (1.0 + (x * 0.5)) - Math.sqrt(x);
                  	} else {
                  		tmp = 0.5 * Math.sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if x <= 1.0:
                  		tmp = (1.0 + (x * 0.5)) - math.sqrt(x)
                  	else:
                  		tmp = 0.5 * math.sqrt((1.0 / x))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (x <= 1.0)
                  		tmp = Float64(Float64(1.0 + Float64(x * 0.5)) - sqrt(x));
                  	else
                  		tmp = Float64(0.5 * sqrt(Float64(1.0 / x)));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (x <= 1.0)
                  		tmp = (1.0 + (x * 0.5)) - sqrt(x);
                  	else
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[x, 1.0], N[(N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 1:\\
                  \;\;\;\;\left(1 + x \cdot 0.5\right) - \sqrt{x}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 1

                    1. Initial program 98.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.4%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+29.9%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative29.9%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified29.9%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 22.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg22.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified22.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around 0 22.6%

                      \[\leadsto \color{blue}{\left(1 + 0.5 \cdot x\right) - \sqrt{x}} \]

                    if 1 < x

                    1. Initial program 84.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 4.8%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+6.2%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative6.2%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified6.2%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg4.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around inf 9.7%

                      \[\leadsto \color{blue}{0.5 \cdot \sqrt{\frac{1}{x}}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification15.6%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\left(1 + x \cdot 0.5\right) - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 22: 39.9% accurate, 7.3× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;1 + \left(x \cdot 0.5 - \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= x 1.0) (+ 1.0 (- (* x 0.5) (sqrt x))) (* 0.5 (sqrt (/ 1.0 x)))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 1.0) {
                  		tmp = 1.0 + ((x * 0.5) - sqrt(x));
                  	} else {
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      if (x <= 1.0d0) then
                          tmp = 1.0d0 + ((x * 0.5d0) - sqrt(x))
                      else
                          tmp = 0.5d0 * sqrt((1.0d0 / x))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 1.0) {
                  		tmp = 1.0 + ((x * 0.5) - Math.sqrt(x));
                  	} else {
                  		tmp = 0.5 * Math.sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if x <= 1.0:
                  		tmp = 1.0 + ((x * 0.5) - math.sqrt(x))
                  	else:
                  		tmp = 0.5 * math.sqrt((1.0 / x))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (x <= 1.0)
                  		tmp = Float64(1.0 + Float64(Float64(x * 0.5) - sqrt(x)));
                  	else
                  		tmp = Float64(0.5 * sqrt(Float64(1.0 / x)));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (x <= 1.0)
                  		tmp = 1.0 + ((x * 0.5) - sqrt(x));
                  	else
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[x, 1.0], N[(1.0 + N[(N[(x * 0.5), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 1:\\
                  \;\;\;\;1 + \left(x \cdot 0.5 - \sqrt{x}\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 1

                    1. Initial program 98.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.4%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+29.9%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative29.9%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified29.9%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 22.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg22.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified22.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around 0 22.6%

                      \[\leadsto \color{blue}{\left(1 + 0.5 \cdot x\right) - \sqrt{x}} \]
                    10. Step-by-step derivation
                      1. associate--l+22.6%

                        \[\leadsto \color{blue}{1 + \left(0.5 \cdot x - \sqrt{x}\right)} \]
                    11. Simplified22.6%

                      \[\leadsto \color{blue}{1 + \left(0.5 \cdot x - \sqrt{x}\right)} \]

                    if 1 < x

                    1. Initial program 84.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 4.8%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+6.2%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative6.2%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified6.2%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg4.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around inf 9.7%

                      \[\leadsto \color{blue}{0.5 \cdot \sqrt{\frac{1}{x}}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification15.6%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;1 + \left(x \cdot 0.5 - \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 23: 39.6% accurate, 7.5× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 0.22:\\ \;\;\;\;1 - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= x 0.22) (- 1.0 (sqrt x)) (* 0.5 (sqrt (/ 1.0 x)))))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 0.22) {
                  		tmp = 1.0 - sqrt(x);
                  	} else {
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) :: tmp
                      if (x <= 0.22d0) then
                          tmp = 1.0d0 - sqrt(x)
                      else
                          tmp = 0.5d0 * sqrt((1.0d0 / x))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x <= 0.22) {
                  		tmp = 1.0 - Math.sqrt(x);
                  	} else {
                  		tmp = 0.5 * Math.sqrt((1.0 / x));
                  	}
                  	return tmp;
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	tmp = 0
                  	if x <= 0.22:
                  		tmp = 1.0 - math.sqrt(x)
                  	else:
                  		tmp = 0.5 * math.sqrt((1.0 / x))
                  	return tmp
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (x <= 0.22)
                  		tmp = Float64(1.0 - sqrt(x));
                  	else
                  		tmp = Float64(0.5 * sqrt(Float64(1.0 / x)));
                  	end
                  	return tmp
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (x <= 0.22)
                  		tmp = 1.0 - sqrt(x);
                  	else
                  		tmp = 0.5 * sqrt((1.0 / x));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := If[LessEqual[x, 0.22], N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq 0.22:\\
                  \;\;\;\;1 - \sqrt{x}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 0.220000000000000001

                    1. Initial program 98.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 15.4%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+29.9%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative29.9%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified29.9%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 22.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg22.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified22.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around 0 22.6%

                      \[\leadsto \color{blue}{1 - \sqrt{x}} \]

                    if 0.220000000000000001 < x

                    1. Initial program 84.1%

                      \[\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) \]
                    2. Add Preprocessing
                    3. Taylor expanded in t around inf 4.8%

                      \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate--l+6.2%

                        \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                      2. +-commutative6.2%

                        \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                    5. Simplified6.2%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                    6. Taylor expanded in x around inf 4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                    7. Step-by-step derivation
                      1. mul-1-neg4.6%

                        \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    8. Simplified4.6%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                    9. Taylor expanded in x around inf 9.7%

                      \[\leadsto \color{blue}{0.5 \cdot \sqrt{\frac{1}{x}}} \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 24: 34.7% accurate, 8.0× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ 1 - \sqrt{x} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t) :precision binary64 (- 1.0 (sqrt x)))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	return 1.0 - sqrt(x);
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
                      code = 1.0d0 - sqrt(x)
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	return 1.0 - Math.sqrt(x);
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	return 1.0 - math.sqrt(x)
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	return Float64(1.0 - sqrt(x))
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp = code(x, y, z, t)
                  	tmp = 1.0 - sqrt(x);
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  1 - \sqrt{x}
                  \end{array}
                  
                  Derivation
                  1. Initial program 90.5%

                    \[\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) \]
                  2. Add Preprocessing
                  3. Taylor expanded in t around inf 9.6%

                    \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                  4. Step-by-step derivation
                    1. associate--l+17.0%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                    2. +-commutative17.0%

                      \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                  5. Simplified17.0%

                    \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                  6. Taylor expanded in x around inf 12.8%

                    \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                  7. Step-by-step derivation
                    1. mul-1-neg12.8%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                  8. Simplified12.8%

                    \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                  9. Taylor expanded in x around 0 11.1%

                    \[\leadsto \color{blue}{1 - \sqrt{x}} \]
                  10. Add Preprocessing

                  Alternative 25: 1.9% accurate, 8.1× speedup?

                  \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ -\sqrt{x} \end{array} \]
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  (FPCore (x y z t) :precision binary64 (- (sqrt x)))
                  assert(x < y && y < z && z < t);
                  double code(double x, double y, double z, double t) {
                  	return -sqrt(x);
                  }
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
                      code = -sqrt(x)
                  end function
                  
                  assert x < y && y < z && z < t;
                  public static double code(double x, double y, double z, double t) {
                  	return -Math.sqrt(x);
                  }
                  
                  [x, y, z, t] = sort([x, y, z, t])
                  def code(x, y, z, t):
                  	return -math.sqrt(x)
                  
                  x, y, z, t = sort([x, y, z, t])
                  function code(x, y, z, t)
                  	return Float64(-sqrt(x))
                  end
                  
                  x, y, z, t = num2cell(sort([x, y, z, t])){:}
                  function tmp = code(x, y, z, t)
                  	tmp = -sqrt(x);
                  end
                  
                  NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_] := (-N[Sqrt[x], $MachinePrecision])
                  
                  \begin{array}{l}
                  [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                  \\
                  -\sqrt{x}
                  \end{array}
                  
                  Derivation
                  1. Initial program 90.5%

                    \[\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) \]
                  2. Add Preprocessing
                  3. Taylor expanded in t around inf 9.6%

                    \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
                  4. Step-by-step derivation
                    1. associate--l+17.0%

                      \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)} \]
                    2. +-commutative17.0%

                      \[\leadsto \sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{z} + \sqrt{y}\right)}\right)\right) \]
                  5. Simplified17.0%

                    \[\leadsto \color{blue}{\sqrt{1 + x} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\right)\right)\right)} \]
                  6. Taylor expanded in x around inf 12.8%

                    \[\leadsto \sqrt{1 + x} + \color{blue}{-1 \cdot \sqrt{x}} \]
                  7. Step-by-step derivation
                    1. mul-1-neg12.8%

                      \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                  8. Simplified12.8%

                    \[\leadsto \sqrt{1 + x} + \color{blue}{\left(-\sqrt{x}\right)} \]
                  9. Taylor expanded in x around 0 11.1%

                    \[\leadsto \color{blue}{1 - \sqrt{x}} \]
                  10. Taylor expanded in x around inf 1.6%

                    \[\leadsto \color{blue}{-1 \cdot \sqrt{x}} \]
                  11. Step-by-step derivation
                    1. neg-mul-11.6%

                      \[\leadsto \color{blue}{-\sqrt{x}} \]
                  12. Simplified1.6%

                    \[\leadsto \color{blue}{-\sqrt{x}} \]
                  13. Add Preprocessing

                  Developer Target 1: 99.4% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \left(\left(\frac{1}{\sqrt{x + 1} + \sqrt{x}} + \frac{1}{\sqrt{y + 1} + \sqrt{y}}\right) + \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (+
                    (+
                     (+
                      (/ 1.0 (+ (sqrt (+ x 1.0)) (sqrt x)))
                      (/ 1.0 (+ (sqrt (+ y 1.0)) (sqrt y))))
                     (/ 1.0 (+ (sqrt (+ z 1.0)) (sqrt z))))
                    (- (sqrt (+ t 1.0)) (sqrt t))))
                  double code(double x, double y, double z, double t) {
                  	return (((1.0 / (sqrt((x + 1.0)) + sqrt(x))) + (1.0 / (sqrt((y + 1.0)) + sqrt(y)))) + (1.0 / (sqrt((z + 1.0)) + sqrt(z)))) + (sqrt((t + 1.0)) - sqrt(t));
                  }
                  
                  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 = (((1.0d0 / (sqrt((x + 1.0d0)) + sqrt(x))) + (1.0d0 / (sqrt((y + 1.0d0)) + sqrt(y)))) + (1.0d0 / (sqrt((z + 1.0d0)) + sqrt(z)))) + (sqrt((t + 1.0d0)) - sqrt(t))
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	return (((1.0 / (Math.sqrt((x + 1.0)) + Math.sqrt(x))) + (1.0 / (Math.sqrt((y + 1.0)) + Math.sqrt(y)))) + (1.0 / (Math.sqrt((z + 1.0)) + Math.sqrt(z)))) + (Math.sqrt((t + 1.0)) - Math.sqrt(t));
                  }
                  
                  def code(x, y, z, t):
                  	return (((1.0 / (math.sqrt((x + 1.0)) + math.sqrt(x))) + (1.0 / (math.sqrt((y + 1.0)) + math.sqrt(y)))) + (1.0 / (math.sqrt((z + 1.0)) + math.sqrt(z)))) + (math.sqrt((t + 1.0)) - math.sqrt(t))
                  
                  function code(x, y, z, t)
                  	return Float64(Float64(Float64(Float64(1.0 / Float64(sqrt(Float64(x + 1.0)) + sqrt(x))) + Float64(1.0 / Float64(sqrt(Float64(y + 1.0)) + sqrt(y)))) + Float64(1.0 / Float64(sqrt(Float64(z + 1.0)) + sqrt(z)))) + Float64(sqrt(Float64(t + 1.0)) - sqrt(t)))
                  end
                  
                  function tmp = code(x, y, z, t)
                  	tmp = (((1.0 / (sqrt((x + 1.0)) + sqrt(x))) + (1.0 / (sqrt((y + 1.0)) + sqrt(y)))) + (1.0 / (sqrt((z + 1.0)) + sqrt(z)))) + (sqrt((t + 1.0)) - sqrt(t));
                  end
                  
                  code[x_, y_, z_, t_] := N[(N[(N[(N[(1.0 / N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[N[(z + 1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  \left(\left(\frac{1}{\sqrt{x + 1} + \sqrt{x}} + \frac{1}{\sqrt{y + 1} + \sqrt{y}}\right) + \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right)
                  \end{array}
                  

                  Reproduce

                  ?
                  herbie shell --seed 2024131 
                  (FPCore (x y z t)
                    :name "Main:z from "
                    :precision binary64
                  
                    :alt
                    (! :herbie-platform default (+ (+ (+ (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) (/ 1 (+ (sqrt (+ y 1)) (sqrt y)))) (/ 1 (+ (sqrt (+ z 1)) (sqrt z)))) (- (sqrt (+ t 1)) (sqrt t))))
                  
                    (+ (+ (+ (- (sqrt (+ x 1.0)) (sqrt x)) (- (sqrt (+ y 1.0)) (sqrt y))) (- (sqrt (+ z 1.0)) (sqrt z))) (- (sqrt (+ t 1.0)) (sqrt t))))