Main:z from

Percentage Accurate: 91.5% → 99.6%
Time: 36.7s
Alternatives: 31
Speedup: 1.1×

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 31 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.6% accurate, 0.6× 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}\\ t_3 := \sqrt{1 + x}\\ t_4 := \sqrt{x} + t\_3\\ \mathbf{if}\;t\_2 - \sqrt{z} \leq 0.0001:\\ \;\;\;\;\left(\frac{1}{\sqrt{z} + t\_2} + \frac{1}{\left(\sqrt{y} + t\_1\right) \cdot \frac{t\_4}{\sqrt{y} + \left(t\_1 + t\_4\right)}}\right) + 0.5 \cdot \sqrt{\frac{1}{t}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(\left(t\_3 + t\_2\right) + \frac{1}{\sqrt{t} + \sqrt{1 + t}}\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)))
        (t_3 (sqrt (+ 1.0 x)))
        (t_4 (+ (sqrt x) t_3)))
   (if (<= (- t_2 (sqrt z)) 0.0001)
     (+
      (+
       (/ 1.0 (+ (sqrt z) t_2))
       (/ 1.0 (* (+ (sqrt y) t_1) (/ t_4 (+ (sqrt y) (+ t_1 t_4))))))
      (* 0.5 (sqrt (/ 1.0 t))))
     (-
      (+ 1.0 (+ (+ t_3 t_2) (/ 1.0 (+ (sqrt t) (sqrt (+ 1.0 t))))))
      (+ (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 t_3 = sqrt((1.0 + x));
	double t_4 = sqrt(x) + t_3;
	double tmp;
	if ((t_2 - sqrt(z)) <= 0.0001) {
		tmp = ((1.0 / (sqrt(z) + t_2)) + (1.0 / ((sqrt(y) + t_1) * (t_4 / (sqrt(y) + (t_1 + t_4)))))) + (0.5 * sqrt((1.0 / t)));
	} else {
		tmp = (1.0 + ((t_3 + t_2) + (1.0 / (sqrt(t) + sqrt((1.0 + t)))))) - (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) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = sqrt((y + 1.0d0))
    t_2 = sqrt((1.0d0 + z))
    t_3 = sqrt((1.0d0 + x))
    t_4 = sqrt(x) + t_3
    if ((t_2 - sqrt(z)) <= 0.0001d0) then
        tmp = ((1.0d0 / (sqrt(z) + t_2)) + (1.0d0 / ((sqrt(y) + t_1) * (t_4 / (sqrt(y) + (t_1 + t_4)))))) + (0.5d0 * sqrt((1.0d0 / t)))
    else
        tmp = (1.0d0 + ((t_3 + t_2) + (1.0d0 / (sqrt(t) + sqrt((1.0d0 + t)))))) - (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 t_3 = Math.sqrt((1.0 + x));
	double t_4 = Math.sqrt(x) + t_3;
	double tmp;
	if ((t_2 - Math.sqrt(z)) <= 0.0001) {
		tmp = ((1.0 / (Math.sqrt(z) + t_2)) + (1.0 / ((Math.sqrt(y) + t_1) * (t_4 / (Math.sqrt(y) + (t_1 + t_4)))))) + (0.5 * Math.sqrt((1.0 / t)));
	} else {
		tmp = (1.0 + ((t_3 + t_2) + (1.0 / (Math.sqrt(t) + Math.sqrt((1.0 + t)))))) - (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))
	t_3 = math.sqrt((1.0 + x))
	t_4 = math.sqrt(x) + t_3
	tmp = 0
	if (t_2 - math.sqrt(z)) <= 0.0001:
		tmp = ((1.0 / (math.sqrt(z) + t_2)) + (1.0 / ((math.sqrt(y) + t_1) * (t_4 / (math.sqrt(y) + (t_1 + t_4)))))) + (0.5 * math.sqrt((1.0 / t)))
	else:
		tmp = (1.0 + ((t_3 + t_2) + (1.0 / (math.sqrt(t) + math.sqrt((1.0 + t)))))) - (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))
	t_3 = sqrt(Float64(1.0 + x))
	t_4 = Float64(sqrt(x) + t_3)
	tmp = 0.0
	if (Float64(t_2 - sqrt(z)) <= 0.0001)
		tmp = Float64(Float64(Float64(1.0 / Float64(sqrt(z) + t_2)) + Float64(1.0 / Float64(Float64(sqrt(y) + t_1) * Float64(t_4 / Float64(sqrt(y) + Float64(t_1 + t_4)))))) + Float64(0.5 * sqrt(Float64(1.0 / t))));
	else
		tmp = Float64(Float64(1.0 + Float64(Float64(t_3 + t_2) + Float64(1.0 / Float64(sqrt(t) + sqrt(Float64(1.0 + t)))))) - 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));
	t_3 = sqrt((1.0 + x));
	t_4 = sqrt(x) + t_3;
	tmp = 0.0;
	if ((t_2 - sqrt(z)) <= 0.0001)
		tmp = ((1.0 / (sqrt(z) + t_2)) + (1.0 / ((sqrt(y) + t_1) * (t_4 / (sqrt(y) + (t_1 + t_4)))))) + (0.5 * sqrt((1.0 / t)));
	else
		tmp = (1.0 + ((t_3 + t_2) + (1.0 / (sqrt(t) + sqrt((1.0 + t)))))) - (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]}, 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]}, If[LessEqual[N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision], 0.0001], N[(N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[(N[Sqrt[y], $MachinePrecision] + t$95$1), $MachinePrecision] * N[(t$95$4 / N[(N[Sqrt[y], $MachinePrecision] + N[(t$95$1 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(t$95$3 + t$95$2), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[t], $MachinePrecision] + N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}\\
t_3 := \sqrt{1 + x}\\
t_4 := \sqrt{x} + t\_3\\
\mathbf{if}\;t\_2 - \sqrt{z} \leq 0.0001:\\
\;\;\;\;\left(\frac{1}{\sqrt{z} + t\_2} + \frac{1}{\left(\sqrt{y} + t\_1\right) \cdot \frac{t\_4}{\sqrt{y} + \left(t\_1 + t\_4\right)}}\right) + 0.5 \cdot \sqrt{\frac{1}{t}}\\

\mathbf{else}:\\
\;\;\;\;\left(1 + \left(\left(t\_3 + t\_2\right) + \frac{1}{\sqrt{t} + \sqrt{1 + t}}\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.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. 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. Step-by-step derivation
        1. flip--93.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-inv93.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-sqrt53.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. +-commutative53.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-sqrt93.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. +-commutative93.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-rr93.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/93.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-identity93.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+97.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. +-inverses97.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-eval97.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. +-commutative97.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. Simplified97.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. Step-by-step derivation
        1. clear-num97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      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. 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}}} \]
      5. Taylor expanded in y around 0 27.1%

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{1 + z} - \sqrt{z} \leq 0.0001:\\ \;\;\;\;\left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \frac{1}{\left(\sqrt{y} + \sqrt{y + 1}\right) \cdot \frac{\sqrt{x} + \sqrt{1 + x}}{\sqrt{y} + \left(\sqrt{y + 1} + \left(\sqrt{x} + \sqrt{1 + x}\right)\right)}}\right) + 0.5 \cdot \sqrt{\frac{1}{t}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(\left(\sqrt{1 + x} + \sqrt{1 + z}\right) + \frac{1}{\sqrt{t} + \sqrt{1 + t}}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\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{y + 1} - \sqrt{y}\\ t_2 := \sqrt{1 + t} - \sqrt{t}\\ t_3 := \sqrt{1 + x}\\ t_4 := \sqrt{1 + z}\\ t_5 := \frac{1}{\sqrt{z} + t\_4}\\ \mathbf{if}\;t\_2 + \left(\left(t\_4 - \sqrt{z}\right) + \left(t\_1 + \left(t\_3 - \sqrt{x}\right)\right)\right) \leq 1.0002:\\ \;\;\;\;t\_2 + \left(t\_5 + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_3}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2 + \left(t\_5 + \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 t)) (sqrt t)))
                (t_3 (sqrt (+ 1.0 x)))
                (t_4 (sqrt (+ 1.0 z)))
                (t_5 (/ 1.0 (+ (sqrt z) t_4))))
           (if (<= (+ t_2 (+ (- t_4 (sqrt z)) (+ t_1 (- t_3 (sqrt x))))) 1.0002)
             (+ t_2 (+ t_5 (+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) t_3)))))
             (+ t_2 (+ t_5 (+ 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 + t)) - sqrt(t);
        	double t_3 = sqrt((1.0 + x));
        	double t_4 = sqrt((1.0 + z));
        	double t_5 = 1.0 / (sqrt(z) + t_4);
        	double tmp;
        	if ((t_2 + ((t_4 - sqrt(z)) + (t_1 + (t_3 - sqrt(x))))) <= 1.0002) {
        		tmp = t_2 + (t_5 + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_3))));
        	} else {
        		tmp = t_2 + (t_5 + (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) :: t_4
            real(8) :: t_5
            real(8) :: tmp
            t_1 = sqrt((y + 1.0d0)) - sqrt(y)
            t_2 = sqrt((1.0d0 + t)) - sqrt(t)
            t_3 = sqrt((1.0d0 + x))
            t_4 = sqrt((1.0d0 + z))
            t_5 = 1.0d0 / (sqrt(z) + t_4)
            if ((t_2 + ((t_4 - sqrt(z)) + (t_1 + (t_3 - sqrt(x))))) <= 1.0002d0) then
                tmp = t_2 + (t_5 + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + t_3))))
            else
                tmp = t_2 + (t_5 + (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 + t)) - Math.sqrt(t);
        	double t_3 = Math.sqrt((1.0 + x));
        	double t_4 = Math.sqrt((1.0 + z));
        	double t_5 = 1.0 / (Math.sqrt(z) + t_4);
        	double tmp;
        	if ((t_2 + ((t_4 - Math.sqrt(z)) + (t_1 + (t_3 - Math.sqrt(x))))) <= 1.0002) {
        		tmp = t_2 + (t_5 + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + t_3))));
        	} else {
        		tmp = t_2 + (t_5 + (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 + t)) - math.sqrt(t)
        	t_3 = math.sqrt((1.0 + x))
        	t_4 = math.sqrt((1.0 + z))
        	t_5 = 1.0 / (math.sqrt(z) + t_4)
        	tmp = 0
        	if (t_2 + ((t_4 - math.sqrt(z)) + (t_1 + (t_3 - math.sqrt(x))))) <= 1.0002:
        		tmp = t_2 + (t_5 + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + t_3))))
        	else:
        		tmp = t_2 + (t_5 + (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 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t))
        	t_3 = sqrt(Float64(1.0 + x))
        	t_4 = sqrt(Float64(1.0 + z))
        	t_5 = Float64(1.0 / Float64(sqrt(z) + t_4))
        	tmp = 0.0
        	if (Float64(t_2 + Float64(Float64(t_4 - sqrt(z)) + Float64(t_1 + Float64(t_3 - sqrt(x))))) <= 1.0002)
        		tmp = Float64(t_2 + Float64(t_5 + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + t_3)))));
        	else
        		tmp = Float64(t_2 + Float64(t_5 + 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 + t)) - sqrt(t);
        	t_3 = sqrt((1.0 + x));
        	t_4 = sqrt((1.0 + z));
        	t_5 = 1.0 / (sqrt(z) + t_4);
        	tmp = 0.0;
        	if ((t_2 + ((t_4 - sqrt(z)) + (t_1 + (t_3 - sqrt(x))))) <= 1.0002)
        		tmp = t_2 + (t_5 + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_3))));
        	else
        		tmp = t_2 + (t_5 + (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[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + x), $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$2 + N[(N[(t$95$4 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(t$95$3 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0002], N[(t$95$2 + 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$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(t$95$5 + 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 + t} - \sqrt{t}\\
        t_3 := \sqrt{1 + x}\\
        t_4 := \sqrt{1 + z}\\
        t_5 := \frac{1}{\sqrt{z} + t\_4}\\
        \mathbf{if}\;t\_2 + \left(\left(t\_4 - \sqrt{z}\right) + \left(t\_1 + \left(t\_3 - \sqrt{x}\right)\right)\right) \leq 1.0002:\\
        \;\;\;\;t\_2 + \left(t\_5 + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_3}\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2 + \left(t\_5 + \left(t\_1 + \left(1 - \sqrt{x}\right)\right)\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. Taylor expanded in x around 0 60.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) \]
            4. 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) \]
            5. Applied egg-rr60.9%

              \[\leadsto \left(\left(\left(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) \]
            6. 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) \]
            7. Simplified60.9%

              \[\leadsto \left(\left(\left(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 simplification67.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(1 - \sqrt{x}\right)\right)\right)\\ \end{array} \]
          8. Add Preprocessing

          Alternative 4: 99.6% accurate, 0.6× 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{1 + z}\\ t_3 := \sqrt{1 + x}\\ t_4 := \sqrt{x} + t\_3\\ t_5 := \sqrt{1 + t}\\ \mathbf{if}\;t\_2 - \sqrt{z} \leq 0.0001:\\ \;\;\;\;\left(t\_5 - \sqrt{t}\right) + \left(\frac{t\_1 + t\_4}{t\_1 \cdot t\_4} + 0.5 \cdot \sqrt{\frac{1}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(\left(t\_3 + t\_2\right) + \frac{1}{\sqrt{t} + t\_5}\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) (sqrt (+ y 1.0))))
                  (t_2 (sqrt (+ 1.0 z)))
                  (t_3 (sqrt (+ 1.0 x)))
                  (t_4 (+ (sqrt x) t_3))
                  (t_5 (sqrt (+ 1.0 t))))
             (if (<= (- t_2 (sqrt z)) 0.0001)
               (+
                (- t_5 (sqrt t))
                (+ (/ (+ t_1 t_4) (* t_1 t_4)) (* 0.5 (sqrt (/ 1.0 z)))))
               (-
                (+ 1.0 (+ (+ t_3 t_2) (/ 1.0 (+ (sqrt t) t_5))))
                (+ (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) + sqrt((y + 1.0));
          	double t_2 = sqrt((1.0 + z));
          	double t_3 = sqrt((1.0 + x));
          	double t_4 = sqrt(x) + t_3;
          	double t_5 = sqrt((1.0 + t));
          	double tmp;
          	if ((t_2 - sqrt(z)) <= 0.0001) {
          		tmp = (t_5 - sqrt(t)) + (((t_1 + t_4) / (t_1 * t_4)) + (0.5 * sqrt((1.0 / z))));
          	} else {
          		tmp = (1.0 + ((t_3 + t_2) + (1.0 / (sqrt(t) + t_5)))) - (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) :: t_3
              real(8) :: t_4
              real(8) :: t_5
              real(8) :: tmp
              t_1 = sqrt(y) + sqrt((y + 1.0d0))
              t_2 = sqrt((1.0d0 + z))
              t_3 = sqrt((1.0d0 + x))
              t_4 = sqrt(x) + t_3
              t_5 = sqrt((1.0d0 + t))
              if ((t_2 - sqrt(z)) <= 0.0001d0) then
                  tmp = (t_5 - sqrt(t)) + (((t_1 + t_4) / (t_1 * t_4)) + (0.5d0 * sqrt((1.0d0 / z))))
              else
                  tmp = (1.0d0 + ((t_3 + t_2) + (1.0d0 / (sqrt(t) + t_5)))) - (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) + Math.sqrt((y + 1.0));
          	double t_2 = Math.sqrt((1.0 + z));
          	double t_3 = Math.sqrt((1.0 + x));
          	double t_4 = Math.sqrt(x) + t_3;
          	double t_5 = Math.sqrt((1.0 + t));
          	double tmp;
          	if ((t_2 - Math.sqrt(z)) <= 0.0001) {
          		tmp = (t_5 - Math.sqrt(t)) + (((t_1 + t_4) / (t_1 * t_4)) + (0.5 * Math.sqrt((1.0 / z))));
          	} else {
          		tmp = (1.0 + ((t_3 + t_2) + (1.0 / (Math.sqrt(t) + t_5)))) - (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) + math.sqrt((y + 1.0))
          	t_2 = math.sqrt((1.0 + z))
          	t_3 = math.sqrt((1.0 + x))
          	t_4 = math.sqrt(x) + t_3
          	t_5 = math.sqrt((1.0 + t))
          	tmp = 0
          	if (t_2 - math.sqrt(z)) <= 0.0001:
          		tmp = (t_5 - math.sqrt(t)) + (((t_1 + t_4) / (t_1 * t_4)) + (0.5 * math.sqrt((1.0 / z))))
          	else:
          		tmp = (1.0 + ((t_3 + t_2) + (1.0 / (math.sqrt(t) + t_5)))) - (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 = Float64(sqrt(y) + sqrt(Float64(y + 1.0)))
          	t_2 = sqrt(Float64(1.0 + z))
          	t_3 = sqrt(Float64(1.0 + x))
          	t_4 = Float64(sqrt(x) + t_3)
          	t_5 = sqrt(Float64(1.0 + t))
          	tmp = 0.0
          	if (Float64(t_2 - sqrt(z)) <= 0.0001)
          		tmp = Float64(Float64(t_5 - sqrt(t)) + Float64(Float64(Float64(t_1 + t_4) / Float64(t_1 * t_4)) + Float64(0.5 * sqrt(Float64(1.0 / z)))));
          	else
          		tmp = Float64(Float64(1.0 + Float64(Float64(t_3 + t_2) + Float64(1.0 / Float64(sqrt(t) + t_5)))) - 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) + sqrt((y + 1.0));
          	t_2 = sqrt((1.0 + z));
          	t_3 = sqrt((1.0 + x));
          	t_4 = sqrt(x) + t_3;
          	t_5 = sqrt((1.0 + t));
          	tmp = 0.0;
          	if ((t_2 - sqrt(z)) <= 0.0001)
          		tmp = (t_5 - sqrt(t)) + (((t_1 + t_4) / (t_1 * t_4)) + (0.5 * sqrt((1.0 / z))));
          	else
          		tmp = (1.0 + ((t_3 + t_2) + (1.0 / (sqrt(t) + t_5)))) - (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[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $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[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision], 0.0001], N[(N[(t$95$5 - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$1 + t$95$4), $MachinePrecision] / N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(t$95$3 + t$95$2), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[t], $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $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} + \sqrt{y + 1}\\
          t_2 := \sqrt{1 + z}\\
          t_3 := \sqrt{1 + x}\\
          t_4 := \sqrt{x} + t\_3\\
          t_5 := \sqrt{1 + t}\\
          \mathbf{if}\;t\_2 - \sqrt{z} \leq 0.0001:\\
          \;\;\;\;\left(t\_5 - \sqrt{t}\right) + \left(\frac{t\_1 + t\_4}{t\_1 \cdot t\_4} + 0.5 \cdot \sqrt{\frac{1}{z}}\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(1 + \left(\left(t\_3 + t\_2\right) + \frac{1}{\sqrt{t} + t\_5}\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.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. 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) \]

              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. 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}}} \]
              5. Taylor expanded in y around 0 27.1%

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{1 + z} - \sqrt{z} \leq 0.0001:\\ \;\;\;\;\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)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(\left(\sqrt{1 + x} + \sqrt{1 + z}\right) + \frac{1}{\sqrt{t} + \sqrt{1 + t}}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\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: 96.9% accurate, 0.7× 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{y + 1}\\ t_3 := \sqrt{1 + x}\\ \mathbf{if}\;\left(t\_2 - \sqrt{y}\right) + \left(t\_3 - \sqrt{x}\right) \leq 0.999:\\ \;\;\;\;t\_1 + \left(\frac{1}{\sqrt{x} + t\_3} + \frac{1}{1 + \sqrt{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(1 - \sqrt{x}\right) + \frac{1}{\sqrt{y} + t\_2}\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 t)) (sqrt t)))
                      (t_2 (sqrt (+ y 1.0)))
                      (t_3 (sqrt (+ 1.0 x))))
                 (if (<= (+ (- t_2 (sqrt y)) (- t_3 (sqrt x))) 0.999)
                   (+ t_1 (+ (/ 1.0 (+ (sqrt x) t_3)) (/ 1.0 (+ 1.0 (sqrt z)))))
                   (+
                    t_1
                    (+
                     (- (sqrt (+ 1.0 z)) (sqrt z))
                     (+ (- 1.0 (sqrt x)) (/ 1.0 (+ (sqrt y) t_2))))))))
              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((y + 1.0));
              	double t_3 = sqrt((1.0 + x));
              	double tmp;
              	if (((t_2 - sqrt(y)) + (t_3 - sqrt(x))) <= 0.999) {
              		tmp = t_1 + ((1.0 / (sqrt(x) + t_3)) + (1.0 / (1.0 + sqrt(z))));
              	} else {
              		tmp = t_1 + ((sqrt((1.0 + z)) - sqrt(z)) + ((1.0 - sqrt(x)) + (1.0 / (sqrt(y) + t_2))));
              	}
              	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 + t)) - sqrt(t)
                  t_2 = sqrt((y + 1.0d0))
                  t_3 = sqrt((1.0d0 + x))
                  if (((t_2 - sqrt(y)) + (t_3 - sqrt(x))) <= 0.999d0) then
                      tmp = t_1 + ((1.0d0 / (sqrt(x) + t_3)) + (1.0d0 / (1.0d0 + sqrt(z))))
                  else
                      tmp = t_1 + ((sqrt((1.0d0 + z)) - sqrt(z)) + ((1.0d0 - sqrt(x)) + (1.0d0 / (sqrt(y) + t_2))))
                  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((y + 1.0));
              	double t_3 = Math.sqrt((1.0 + x));
              	double tmp;
              	if (((t_2 - Math.sqrt(y)) + (t_3 - Math.sqrt(x))) <= 0.999) {
              		tmp = t_1 + ((1.0 / (Math.sqrt(x) + t_3)) + (1.0 / (1.0 + Math.sqrt(z))));
              	} else {
              		tmp = t_1 + ((Math.sqrt((1.0 + z)) - Math.sqrt(z)) + ((1.0 - Math.sqrt(x)) + (1.0 / (Math.sqrt(y) + t_2))));
              	}
              	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((y + 1.0))
              	t_3 = math.sqrt((1.0 + x))
              	tmp = 0
              	if ((t_2 - math.sqrt(y)) + (t_3 - math.sqrt(x))) <= 0.999:
              		tmp = t_1 + ((1.0 / (math.sqrt(x) + t_3)) + (1.0 / (1.0 + math.sqrt(z))))
              	else:
              		tmp = t_1 + ((math.sqrt((1.0 + z)) - math.sqrt(z)) + ((1.0 - math.sqrt(x)) + (1.0 / (math.sqrt(y) + t_2))))
              	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(y + 1.0))
              	t_3 = sqrt(Float64(1.0 + x))
              	tmp = 0.0
              	if (Float64(Float64(t_2 - sqrt(y)) + Float64(t_3 - sqrt(x))) <= 0.999)
              		tmp = Float64(t_1 + Float64(Float64(1.0 / Float64(sqrt(x) + t_3)) + Float64(1.0 / Float64(1.0 + sqrt(z)))));
              	else
              		tmp = Float64(t_1 + Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(Float64(1.0 - sqrt(x)) + Float64(1.0 / Float64(sqrt(y) + t_2)))));
              	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((y + 1.0));
              	t_3 = sqrt((1.0 + x));
              	tmp = 0.0;
              	if (((t_2 - sqrt(y)) + (t_3 - sqrt(x))) <= 0.999)
              		tmp = t_1 + ((1.0 / (sqrt(x) + t_3)) + (1.0 / (1.0 + sqrt(z))));
              	else
              		tmp = t_1 + ((sqrt((1.0 + z)) - sqrt(z)) + ((1.0 - sqrt(x)) + (1.0 / (sqrt(y) + t_2))));
              	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[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(t$95$3 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.999], N[(t$95$1 + N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(1.0 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + t$95$2), $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 + t} - \sqrt{t}\\
              t_2 := \sqrt{y + 1}\\
              t_3 := \sqrt{1 + x}\\
              \mathbf{if}\;\left(t\_2 - \sqrt{y}\right) + \left(t\_3 - \sqrt{x}\right) \leq 0.999:\\
              \;\;\;\;t\_1 + \left(\frac{1}{\sqrt{x} + t\_3} + \frac{1}{1 + \sqrt{z}}\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1 + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(1 - \sqrt{x}\right) + \frac{1}{\sqrt{y} + t\_2}\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (+.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))) < 0.998999999999999999

                1. Initial program 74.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. Step-by-step derivation
                  1. +-commutative74.4%

                    \[\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--74.4%

                    \[\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--74.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-add74.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-rr75.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. Simplified87.3%

                    \[\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.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-inv90.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-sqrt68.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. +-commutative68.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-sqrt90.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. +-commutative90.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-rr90.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/90.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-identity90.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+96.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. +-inverses96.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-eval96.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. +-commutative96.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. Simplified96.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 87.8%

                    \[\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. +-commutative87.8%

                      \[\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. Simplified87.8%

                    \[\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) \]
                  9. Taylor expanded in z around 0 76.6%

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

                  if 0.998999999999999999 < (+.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)))

                  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. Taylor expanded in x around 0 62.3%

                    \[\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) \]
                  4. Step-by-step derivation
                    1. flip--62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\left(\left(1 - \sqrt{x}\right) + \color{blue}{\frac{1}{\sqrt{y} + \sqrt{1 + y}}}\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 simplification67.0%

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

                Alternative 7: 90.9% 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}\\ t_2 := t\_1 - \sqrt{z}\\ t_3 := \sqrt{1 + x}\\ \mathbf{if}\;t\_2 \leq 0.0001:\\ \;\;\;\;t\_3 + \left(\left(\sqrt{y + 1} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\ \mathbf{elif}\;t\_2 \leq 0.99999998:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{t}} + \left(\left(t\_1 + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(\left(t\_3 + t\_1\right) + \frac{1}{\sqrt{t} + \sqrt{1 + t}}\right)\right) - \sqrt{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
                 (let* ((t_1 (sqrt (+ 1.0 z))) (t_2 (- t_1 (sqrt z))) (t_3 (sqrt (+ 1.0 x))))
                   (if (<= t_2 0.0001)
                     (+
                      t_3
                      (- (+ (sqrt (+ y 1.0)) (* 0.5 (sqrt (/ 1.0 z)))) (+ (sqrt y) (sqrt x))))
                     (if (<= t_2 0.99999998)
                       (+
                        (* 0.5 (sqrt (/ 1.0 t)))
                        (- (+ t_1 2.0) (+ (sqrt x) (+ (sqrt y) (sqrt z)))))
                       (-
                        (+ 1.0 (+ (+ t_3 t_1) (/ 1.0 (+ (sqrt t) (sqrt (+ 1.0 t))))))
                        (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));
                	double t_2 = t_1 - sqrt(z);
                	double t_3 = sqrt((1.0 + x));
                	double tmp;
                	if (t_2 <= 0.0001) {
                		tmp = t_3 + ((sqrt((y + 1.0)) + (0.5 * sqrt((1.0 / z)))) - (sqrt(y) + sqrt(x)));
                	} else if (t_2 <= 0.99999998) {
                		tmp = (0.5 * sqrt((1.0 / t))) + ((t_1 + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z))));
                	} else {
                		tmp = (1.0 + ((t_3 + t_1) + (1.0 / (sqrt(t) + sqrt((1.0 + t)))))) - 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))
                    t_2 = t_1 - sqrt(z)
                    t_3 = sqrt((1.0d0 + x))
                    if (t_2 <= 0.0001d0) then
                        tmp = t_3 + ((sqrt((y + 1.0d0)) + (0.5d0 * sqrt((1.0d0 / z)))) - (sqrt(y) + sqrt(x)))
                    else if (t_2 <= 0.99999998d0) then
                        tmp = (0.5d0 * sqrt((1.0d0 / t))) + ((t_1 + 2.0d0) - (sqrt(x) + (sqrt(y) + sqrt(z))))
                    else
                        tmp = (1.0d0 + ((t_3 + t_1) + (1.0d0 / (sqrt(t) + sqrt((1.0d0 + t)))))) - 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));
                	double t_2 = t_1 - Math.sqrt(z);
                	double t_3 = Math.sqrt((1.0 + x));
                	double tmp;
                	if (t_2 <= 0.0001) {
                		tmp = t_3 + ((Math.sqrt((y + 1.0)) + (0.5 * Math.sqrt((1.0 / z)))) - (Math.sqrt(y) + Math.sqrt(x)));
                	} else if (t_2 <= 0.99999998) {
                		tmp = (0.5 * Math.sqrt((1.0 / t))) + ((t_1 + 2.0) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z))));
                	} else {
                		tmp = (1.0 + ((t_3 + t_1) + (1.0 / (Math.sqrt(t) + Math.sqrt((1.0 + t)))))) - 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))
                	t_2 = t_1 - math.sqrt(z)
                	t_3 = math.sqrt((1.0 + x))
                	tmp = 0
                	if t_2 <= 0.0001:
                		tmp = t_3 + ((math.sqrt((y + 1.0)) + (0.5 * math.sqrt((1.0 / z)))) - (math.sqrt(y) + math.sqrt(x)))
                	elif t_2 <= 0.99999998:
                		tmp = (0.5 * math.sqrt((1.0 / t))) + ((t_1 + 2.0) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))))
                	else:
                		tmp = (1.0 + ((t_3 + t_1) + (1.0 / (math.sqrt(t) + math.sqrt((1.0 + t)))))) - 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 + z))
                	t_2 = Float64(t_1 - sqrt(z))
                	t_3 = sqrt(Float64(1.0 + x))
                	tmp = 0.0
                	if (t_2 <= 0.0001)
                		tmp = Float64(t_3 + Float64(Float64(sqrt(Float64(y + 1.0)) + Float64(0.5 * sqrt(Float64(1.0 / z)))) - Float64(sqrt(y) + sqrt(x))));
                	elseif (t_2 <= 0.99999998)
                		tmp = Float64(Float64(0.5 * sqrt(Float64(1.0 / t))) + Float64(Float64(t_1 + 2.0) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))));
                	else
                		tmp = Float64(Float64(1.0 + Float64(Float64(t_3 + t_1) + Float64(1.0 / Float64(sqrt(t) + sqrt(Float64(1.0 + t)))))) - 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));
                	t_2 = t_1 - sqrt(z);
                	t_3 = sqrt((1.0 + x));
                	tmp = 0.0;
                	if (t_2 <= 0.0001)
                		tmp = t_3 + ((sqrt((y + 1.0)) + (0.5 * sqrt((1.0 / z)))) - (sqrt(y) + sqrt(x)));
                	elseif (t_2 <= 0.99999998)
                		tmp = (0.5 * sqrt((1.0 / t))) + ((t_1 + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z))));
                	else
                		tmp = (1.0 + ((t_3 + t_1) + (1.0 / (sqrt(t) + sqrt((1.0 + t)))))) - 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 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0001], N[(t$95$3 + 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], If[LessEqual[t$95$2, 0.99999998], N[(N[(0.5 * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $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[(1.0 + N[(N[(t$95$3 + t$95$1), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[t], $MachinePrecision] + N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]]]]
                
                \begin{array}{l}
                [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                \\
                \begin{array}{l}
                t_1 := \sqrt{1 + z}\\
                t_2 := t\_1 - \sqrt{z}\\
                t_3 := \sqrt{1 + x}\\
                \mathbf{if}\;t\_2 \leq 0.0001:\\
                \;\;\;\;t\_3 + \left(\left(\sqrt{y + 1} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
                
                \mathbf{elif}\;t\_2 \leq 0.99999998:\\
                \;\;\;\;0.5 \cdot \sqrt{\frac{1}{t}} + \left(\left(t\_1 + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(1 + \left(\left(t\_3 + t\_1\right) + \frac{1}{\sqrt{t} + \sqrt{1 + t}}\right)\right) - \sqrt{x}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 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)) < 0.999999980000000011

                  1. Initial program 95.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 34.0%

                    \[\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) \]
                  4. Taylor expanded in t around inf 23.6%

                    \[\leadsto \left(\left(\left(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}}} \]
                  5. Taylor expanded in y around 0 2.7%

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

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

                  1. Initial program 96.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. Step-by-step derivation
                    1. flip--96.9%

                      \[\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-sqrt78.7%

                      \[\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.2%

                      \[\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.2%

                    \[\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}}} \]
                  5. Taylor expanded in y around 0 28.0%

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

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

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

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

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

                  \[\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{elif}\;\sqrt{1 + z} - \sqrt{z} \leq 0.99999998:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{t}} + \left(\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \left(\left(\sqrt{1 + x} + \sqrt{1 + z}\right) + \frac{1}{\sqrt{t} + \sqrt{1 + t}}\right)\right) - \sqrt{x}\\ \end{array} \]
                5. Add Preprocessing

                Alternative 8: 98.8% 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}\\ 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(\left(t\_1 - \sqrt{z}\right) + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3 + \left(\frac{1}{\sqrt{z} + 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)))
                        (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 (sqrt z))
                       (+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))))))
                     (+ t_3 (+ (/ 1.0 (+ (sqrt z) 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));
                	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 - sqrt(z)) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))));
                	} else {
                		tmp = t_3 + ((1.0 / (sqrt(z) + 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))
                    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 - sqrt(z)) + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x))))))
                    else
                        tmp = t_3 + ((1.0d0 / (sqrt(z) + 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));
                	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 - Math.sqrt(z)) + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x))))));
                	} else {
                		tmp = t_3 + ((1.0 / (Math.sqrt(z) + 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))
                	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 - math.sqrt(z)) + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + math.sqrt((1.0 + x))))))
                	else:
                		tmp = t_3 + ((1.0 / (math.sqrt(z) + 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 = sqrt(Float64(1.0 + 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(Float64(t_1 - sqrt(z)) + 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(1.0 / Float64(sqrt(z) + 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));
                	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 - sqrt(z)) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))));
                	else
                		tmp = t_3 + ((1.0 / (sqrt(z) + 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[Sqrt[N[(1.0 + 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[(N[(t$95$1 - N[Sqrt[z], $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[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + 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}\\
                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(\left(t\_1 - \sqrt{z}\right) + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_3 + \left(\frac{1}{\sqrt{z} + 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. +-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. Taylor expanded in y around inf 91.8%

                      \[\leadsto \left(\color{blue}{\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\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) \]
                    4. 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-sqrt77.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. +-commutative77.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) \]
                    5. Applied egg-rr49.7%

                      \[\leadsto \left(\left(\left(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) \]
                    6. 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.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. +-inverses99.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-eval99.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. +-commutative99.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) \]
                    7. Simplified49.7%

                      \[\leadsto \left(\left(\left(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 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(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right)\right)\\ \end{array} \]
                  8. Add Preprocessing

                  Alternative 9: 95.9% 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 + t} - \sqrt{t}\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{-8}:\\ \;\;\;\;t\_2 + \left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{1 + \sqrt{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2 + \left(\left(\sqrt{1 + z} - \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 t)) (sqrt t))))
                     (if (<= t_1 2e-8)
                       (+ t_2 (+ (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))) (/ 1.0 (+ 1.0 (sqrt z)))))
                       (+ t_2 (+ (- (sqrt (+ 1.0 z)) (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 + t)) - sqrt(t);
                  	double tmp;
                  	if (t_1 <= 2e-8) {
                  		tmp = t_2 + ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (1.0 + sqrt(z))));
                  	} else {
                  		tmp = t_2 + ((sqrt((1.0 + z)) - 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) :: tmp
                      t_1 = sqrt((y + 1.0d0)) - sqrt(y)
                      t_2 = sqrt((1.0d0 + t)) - sqrt(t)
                      if (t_1 <= 2d-8) then
                          tmp = t_2 + ((1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))) + (1.0d0 / (1.0d0 + sqrt(z))))
                      else
                          tmp = t_2 + ((sqrt((1.0d0 + z)) - 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 + t)) - Math.sqrt(t);
                  	double tmp;
                  	if (t_1 <= 2e-8) {
                  		tmp = t_2 + ((1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))) + (1.0 / (1.0 + Math.sqrt(z))));
                  	} else {
                  		tmp = t_2 + ((Math.sqrt((1.0 + z)) - 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 + t)) - math.sqrt(t)
                  	tmp = 0
                  	if t_1 <= 2e-8:
                  		tmp = t_2 + ((1.0 / (math.sqrt(x) + math.sqrt((1.0 + x)))) + (1.0 / (1.0 + math.sqrt(z))))
                  	else:
                  		tmp = t_2 + ((math.sqrt((1.0 + z)) - 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 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t))
                  	tmp = 0.0
                  	if (t_1 <= 2e-8)
                  		tmp = Float64(t_2 + Float64(Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))) + Float64(1.0 / Float64(1.0 + sqrt(z)))));
                  	else
                  		tmp = Float64(t_2 + Float64(Float64(sqrt(Float64(1.0 + z)) - 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 + t)) - sqrt(t);
                  	tmp = 0.0;
                  	if (t_1 <= 2e-8)
                  		tmp = t_2 + ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (1.0 + sqrt(z))));
                  	else
                  		tmp = t_2 + ((sqrt((1.0 + z)) - 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[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e-8], N[(t$95$2 + N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(1.0 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - 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 + t} - \sqrt{t}\\
                  \mathbf{if}\;t\_1 \leq 2 \cdot 10^{-8}:\\
                  \;\;\;\;t\_2 + \left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{1 + \sqrt{z}}\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_2 + \left(\left(\sqrt{1 + z} - \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)) < 2e-8

                    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 91.3%

                        \[\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. +-commutative91.3%

                          \[\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. Simplified91.3%

                        \[\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) \]
                      9. Taylor expanded in z around 0 84.0%

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

                      if 2e-8 < (-.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 simplification66.4%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{y + 1} - \sqrt{y} \leq 2 \cdot 10^{-8}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{1 + \sqrt{z}}\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 10: 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 46.8%

                        \[\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) \]
                      4. 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 11: 97.1% accurate, 1.1× speedup?

                    \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \sqrt{1 + t} - \sqrt{t}\\ \mathbf{if}\;y \leq 1.8 \cdot 10^{+15}:\\ \;\;\;\;t\_1 + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 + \left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{1 + \sqrt{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 (+ 1.0 t)) (sqrt t))))
                       (if (<= y 1.8e+15)
                         (+
                          t_1
                          (+
                           (/ 1.0 (+ (sqrt z) (sqrt (+ 1.0 z))))
                           (+ (- (sqrt (+ y 1.0)) (sqrt y)) (- 1.0 (sqrt x)))))
                         (+
                          t_1
                          (+ (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))) (/ 1.0 (+ 1.0 (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 + t)) - sqrt(t);
                    	double tmp;
                    	if (y <= 1.8e+15) {
                    		tmp = t_1 + ((1.0 / (sqrt(z) + sqrt((1.0 + z)))) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 - sqrt(x))));
                    	} else {
                    		tmp = t_1 + ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (1.0 + 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 + t)) - sqrt(t)
                        if (y <= 1.8d+15) then
                            tmp = t_1 + ((1.0d0 / (sqrt(z) + sqrt((1.0d0 + z)))) + ((sqrt((y + 1.0d0)) - sqrt(y)) + (1.0d0 - sqrt(x))))
                        else
                            tmp = t_1 + ((1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))) + (1.0d0 / (1.0d0 + 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 + t)) - Math.sqrt(t);
                    	double tmp;
                    	if (y <= 1.8e+15) {
                    		tmp = t_1 + ((1.0 / (Math.sqrt(z) + Math.sqrt((1.0 + z)))) + ((Math.sqrt((y + 1.0)) - Math.sqrt(y)) + (1.0 - Math.sqrt(x))));
                    	} else {
                    		tmp = t_1 + ((1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))) + (1.0 / (1.0 + 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 + t)) - math.sqrt(t)
                    	tmp = 0
                    	if y <= 1.8e+15:
                    		tmp = t_1 + ((1.0 / (math.sqrt(z) + math.sqrt((1.0 + z)))) + ((math.sqrt((y + 1.0)) - math.sqrt(y)) + (1.0 - math.sqrt(x))))
                    	else:
                    		tmp = t_1 + ((1.0 / (math.sqrt(x) + math.sqrt((1.0 + x)))) + (1.0 / (1.0 + math.sqrt(z))))
                    	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))
                    	tmp = 0.0
                    	if (y <= 1.8e+15)
                    		tmp = Float64(t_1 + Float64(Float64(1.0 / Float64(sqrt(z) + sqrt(Float64(1.0 + z)))) + Float64(Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) + Float64(1.0 - sqrt(x)))));
                    	else
                    		tmp = Float64(t_1 + Float64(Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))) + Float64(1.0 / Float64(1.0 + 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 + t)) - sqrt(t);
                    	tmp = 0.0;
                    	if (y <= 1.8e+15)
                    		tmp = t_1 + ((1.0 / (sqrt(z) + sqrt((1.0 + z)))) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 - sqrt(x))));
                    	else
                    		tmp = t_1 + ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (1.0 + 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[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.8e+15], N[(t$95$1 + N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(1.0 + 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 + t} - \sqrt{t}\\
                    \mathbf{if}\;y \leq 1.8 \cdot 10^{+15}:\\
                    \;\;\;\;t\_1 + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1 + \left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{1 + \sqrt{z}}\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if y < 1.8e15

                      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) \]
                      4. 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-sqrt77.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. +-commutative77.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) \]
                      5. Applied egg-rr49.7%

                        \[\leadsto \left(\left(\left(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) \]
                      6. 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.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. +-inverses99.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-eval99.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. +-commutative99.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) \]
                      7. Simplified49.7%

                        \[\leadsto \left(\left(\left(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) \]

                      if 1.8e15 < y

                      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 91.3%

                          \[\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. +-commutative91.3%

                            \[\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. Simplified91.3%

                          \[\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) \]
                        9. Taylor expanded in z around 0 84.0%

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

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

                      Alternative 12: 91.4% accurate, 1.3× speedup?

                      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 1.2 \cdot 10^{-29}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{t}} + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(1 - \sqrt{x}\right) + \frac{1}{\sqrt{y} + \sqrt{y + 1}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{1 + \sqrt{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
                       (if (<= x 1.2e-29)
                         (+
                          (* 0.5 (sqrt (/ 1.0 t)))
                          (+
                           (- (sqrt (+ 1.0 z)) (sqrt z))
                           (+ (- 1.0 (sqrt x)) (/ 1.0 (+ (sqrt y) (sqrt (+ y 1.0)))))))
                         (+
                          (- (sqrt (+ 1.0 t)) (sqrt t))
                          (+ (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))) (/ 1.0 (+ 1.0 (sqrt z)))))))
                      assert(x < y && y < z && z < t);
                      double code(double x, double y, double z, double t) {
                      	double tmp;
                      	if (x <= 1.2e-29) {
                      		tmp = (0.5 * sqrt((1.0 / t))) + ((sqrt((1.0 + z)) - sqrt(z)) + ((1.0 - sqrt(x)) + (1.0 / (sqrt(y) + sqrt((y + 1.0))))));
                      	} else {
                      		tmp = (sqrt((1.0 + t)) - sqrt(t)) + ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (1.0 + 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) :: tmp
                          if (x <= 1.2d-29) then
                              tmp = (0.5d0 * sqrt((1.0d0 / t))) + ((sqrt((1.0d0 + z)) - sqrt(z)) + ((1.0d0 - sqrt(x)) + (1.0d0 / (sqrt(y) + sqrt((y + 1.0d0))))))
                          else
                              tmp = (sqrt((1.0d0 + t)) - sqrt(t)) + ((1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))) + (1.0d0 / (1.0d0 + 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 tmp;
                      	if (x <= 1.2e-29) {
                      		tmp = (0.5 * Math.sqrt((1.0 / t))) + ((Math.sqrt((1.0 + z)) - Math.sqrt(z)) + ((1.0 - Math.sqrt(x)) + (1.0 / (Math.sqrt(y) + Math.sqrt((y + 1.0))))));
                      	} else {
                      		tmp = (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + ((1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))) + (1.0 / (1.0 + Math.sqrt(z))));
                      	}
                      	return tmp;
                      }
                      
                      [x, y, z, t] = sort([x, y, z, t])
                      def code(x, y, z, t):
                      	tmp = 0
                      	if x <= 1.2e-29:
                      		tmp = (0.5 * math.sqrt((1.0 / t))) + ((math.sqrt((1.0 + z)) - math.sqrt(z)) + ((1.0 - math.sqrt(x)) + (1.0 / (math.sqrt(y) + math.sqrt((y + 1.0))))))
                      	else:
                      		tmp = (math.sqrt((1.0 + t)) - math.sqrt(t)) + ((1.0 / (math.sqrt(x) + math.sqrt((1.0 + x)))) + (1.0 / (1.0 + math.sqrt(z))))
                      	return tmp
                      
                      x, y, z, t = sort([x, y, z, t])
                      function code(x, y, z, t)
                      	tmp = 0.0
                      	if (x <= 1.2e-29)
                      		tmp = Float64(Float64(0.5 * sqrt(Float64(1.0 / t))) + Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(Float64(1.0 - sqrt(x)) + Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(y + 1.0)))))));
                      	else
                      		tmp = Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))) + Float64(1.0 / Float64(1.0 + sqrt(z)))));
                      	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.2e-29)
                      		tmp = (0.5 * sqrt((1.0 / t))) + ((sqrt((1.0 + z)) - sqrt(z)) + ((1.0 - sqrt(x)) + (1.0 / (sqrt(y) + sqrt((y + 1.0))))));
                      	else
                      		tmp = (sqrt((1.0 + t)) - sqrt(t)) + ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (1.0 + 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_] := If[LessEqual[x, 1.2e-29], N[(N[(0.5 * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(1.0 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;x \leq 1.2 \cdot 10^{-29}:\\
                      \;\;\;\;0.5 \cdot \sqrt{\frac{1}{t}} + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(1 - \sqrt{x}\right) + \frac{1}{\sqrt{y} + \sqrt{y + 1}}\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{1 + \sqrt{z}}\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < 1.19999999999999996e-29

                        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 x around 0 98.1%

                          \[\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) \]
                        4. Taylor expanded in t around inf 49.2%

                          \[\leadsto \left(\left(\left(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}}} \]
                        5. Step-by-step derivation
                          1. flip--98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.19999999999999996e-29 < x

                        1. Initial program 84.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. +-commutative84.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--84.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--85.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-add85.1%

                            \[\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-rr85.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. Simplified92.9%

                            \[\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--94.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{\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-inv94.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}{\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-sqrt72.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. +-commutative72.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.7%

                              \[\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.7%

                              \[\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.7%

                            \[\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.7%

                              \[\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.7%

                              \[\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.7%

                              \[\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.7%

                              \[\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.7%

                              \[\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.7%

                              \[\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.7%

                            \[\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 54.8%

                            \[\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. +-commutative54.8%

                              \[\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. Simplified54.8%

                            \[\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) \]
                          9. Taylor expanded in z around 0 49.0%

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

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

                        Alternative 13: 90.6% accurate, 1.3× speedup?

                        \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 5.5 \cdot 10^{+14}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{t}} + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{1 + \sqrt{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
                         (if (<= y 5.5e+14)
                           (+
                            (* 0.5 (sqrt (/ 1.0 t)))
                            (+
                             (- (sqrt (+ 1.0 z)) (sqrt z))
                             (+ (- (sqrt (+ y 1.0)) (sqrt y)) (- 1.0 (sqrt x)))))
                           (+
                            (- (sqrt (+ 1.0 t)) (sqrt t))
                            (+ (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))) (/ 1.0 (+ 1.0 (sqrt z)))))))
                        assert(x < y && y < z && z < t);
                        double code(double x, double y, double z, double t) {
                        	double tmp;
                        	if (y <= 5.5e+14) {
                        		tmp = (0.5 * sqrt((1.0 / t))) + ((sqrt((1.0 + z)) - sqrt(z)) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 - sqrt(x))));
                        	} else {
                        		tmp = (sqrt((1.0 + t)) - sqrt(t)) + ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (1.0 + 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) :: tmp
                            if (y <= 5.5d+14) then
                                tmp = (0.5d0 * sqrt((1.0d0 / t))) + ((sqrt((1.0d0 + z)) - sqrt(z)) + ((sqrt((y + 1.0d0)) - sqrt(y)) + (1.0d0 - sqrt(x))))
                            else
                                tmp = (sqrt((1.0d0 + t)) - sqrt(t)) + ((1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))) + (1.0d0 / (1.0d0 + 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 tmp;
                        	if (y <= 5.5e+14) {
                        		tmp = (0.5 * Math.sqrt((1.0 / t))) + ((Math.sqrt((1.0 + z)) - Math.sqrt(z)) + ((Math.sqrt((y + 1.0)) - Math.sqrt(y)) + (1.0 - Math.sqrt(x))));
                        	} else {
                        		tmp = (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + ((1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))) + (1.0 / (1.0 + Math.sqrt(z))));
                        	}
                        	return tmp;
                        }
                        
                        [x, y, z, t] = sort([x, y, z, t])
                        def code(x, y, z, t):
                        	tmp = 0
                        	if y <= 5.5e+14:
                        		tmp = (0.5 * math.sqrt((1.0 / t))) + ((math.sqrt((1.0 + z)) - math.sqrt(z)) + ((math.sqrt((y + 1.0)) - math.sqrt(y)) + (1.0 - math.sqrt(x))))
                        	else:
                        		tmp = (math.sqrt((1.0 + t)) - math.sqrt(t)) + ((1.0 / (math.sqrt(x) + math.sqrt((1.0 + x)))) + (1.0 / (1.0 + math.sqrt(z))))
                        	return tmp
                        
                        x, y, z, t = sort([x, y, z, t])
                        function code(x, y, z, t)
                        	tmp = 0.0
                        	if (y <= 5.5e+14)
                        		tmp = Float64(Float64(0.5 * sqrt(Float64(1.0 / t))) + Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) + Float64(1.0 - sqrt(x)))));
                        	else
                        		tmp = Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))) + Float64(1.0 / Float64(1.0 + sqrt(z)))));
                        	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 (y <= 5.5e+14)
                        		tmp = (0.5 * sqrt((1.0 / t))) + ((sqrt((1.0 + z)) - sqrt(z)) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 - sqrt(x))));
                        	else
                        		tmp = (sqrt((1.0 + t)) - sqrt(t)) + ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (1.0 + 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_] := If[LessEqual[y, 5.5e+14], N[(N[(0.5 * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(1.0 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;y \leq 5.5 \cdot 10^{+14}:\\
                        \;\;\;\;0.5 \cdot \sqrt{\frac{1}{t}} + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right)\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{1 + \sqrt{z}}\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < 5.5e14

                          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) \]
                          4. Taylor expanded in t around inf 26.3%

                            \[\leadsto \left(\left(\left(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}}} \]

                          if 5.5e14 < y

                          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 91.3%

                              \[\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. +-commutative91.3%

                                \[\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. Simplified91.3%

                              \[\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) \]
                            9. Taylor expanded in z around 0 84.0%

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

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

                          Alternative 14: 85.9% accurate, 1.6× speedup?

                          \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 140000:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{t}} + \left(\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 + x} + \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 140000.0)
                             (+
                              (* 0.5 (sqrt (/ 1.0 t)))
                              (- (+ (sqrt (+ 1.0 z)) 2.0) (+ (sqrt x) (+ (sqrt y) (sqrt z)))))
                             (+
                              (sqrt (+ 1.0 x))
                              (- (+ (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 <= 140000.0) {
                          		tmp = (0.5 * sqrt((1.0 / t))) + ((sqrt((1.0 + z)) + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z))));
                          	} else {
                          		tmp = sqrt((1.0 + x)) + ((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 <= 140000.0d0) then
                                  tmp = (0.5d0 * sqrt((1.0d0 / t))) + ((sqrt((1.0d0 + z)) + 2.0d0) - (sqrt(x) + (sqrt(y) + sqrt(z))))
                              else
                                  tmp = sqrt((1.0d0 + x)) + ((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 <= 140000.0) {
                          		tmp = (0.5 * Math.sqrt((1.0 / t))) + ((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)) + (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 <= 140000.0:
                          		tmp = (0.5 * math.sqrt((1.0 / t))) + ((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)) + (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 <= 140000.0)
                          		tmp = Float64(Float64(0.5 * sqrt(Float64(1.0 / t))) + 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(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 <= 140000.0)
                          		tmp = (0.5 * sqrt((1.0 / t))) + ((sqrt((1.0 + z)) + 2.0) - (sqrt(x) + (sqrt(y) + sqrt(z))));
                          	else
                          		tmp = sqrt((1.0 + x)) + ((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, 140000.0], N[(N[(0.5 * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 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]), $MachinePrecision], 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]]
                          
                          \begin{array}{l}
                          [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;z \leq 140000:\\
                          \;\;\;\;0.5 \cdot \sqrt{\frac{1}{t}} + \left(\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\sqrt{1 + x} + \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 < 1.4e5

                            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 46.8%

                              \[\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) \]
                            4. Taylor expanded in t around inf 21.4%

                              \[\leadsto \left(\left(\left(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}}} \]
                            5. Taylor expanded in y around 0 8.8%

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

                            if 1.4e5 < 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(\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 simplification19.4%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 140000:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{t}} + \left(\left(\sqrt{1 + z} + 2\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 + x} + \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 15: 86.0% 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}:\\ \;\;\;\;\sqrt{1 + x} + \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))))
                               (+
                                (sqrt (+ 1.0 x))
                                (- (+ 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 = sqrt((1.0 + x)) + ((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 = sqrt((1.0d0 + x)) + ((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 = Math.sqrt((1.0 + x)) + ((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 = math.sqrt((1.0 + x)) + ((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(sqrt(Float64(1.0 + x)) + 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 = sqrt((1.0 + x)) + ((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[(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]]]
                          
                          \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}:\\
                          \;\;\;\;\sqrt{1 + x} + \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 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)} \]
                          3. Recombined 2 regimes into one program.
                          4. Final simplification21.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}:\\ \;\;\;\;\sqrt{1 + x} + \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 16: 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 3.3%

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

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

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

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

                              \[\leadsto \color{blue}{1 + \left(\left(0.5 \cdot \sqrt{\frac{1}{z}} + \sqrt{1 + y}\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 17: 85.8% accurate, 2.0× speedup?

                          \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 3500000:\\ \;\;\;\;\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 3500000.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 <= 3500000.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 <= 3500000.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 <= 3500000.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 <= 3500000.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 <= 3500000.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 <= 3500000.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, 3500000.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 3500000:\\
                          \;\;\;\;\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 < 3.5e6

                            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)} \]
                            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)} \]
                            8. Step-by-step derivation
                              1. +-commutative9.8%

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

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

                            if 3.5e6 < 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 3.3%

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

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

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

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

                              \[\leadsto \color{blue}{1 + \left(\left(0.5 \cdot \sqrt{\frac{1}{z}} + \sqrt{1 + y}\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 3500000:\\ \;\;\;\;\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 18: 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 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)} \]
                            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)} \]
                            8. Step-by-step derivation
                              1. +-commutative9.8%

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

                              \[\leadsto \color{blue}{\left(2 + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{z} + \sqrt{y}\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 19: 80.7% accurate, 2.0× 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 0.08:\\ \;\;\;\;\left(1 + \left(t\_1 + \sqrt{1 + z}\right)\right) - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 + x} + \left(t\_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
                           (let* ((t_1 (sqrt (+ y 1.0))))
                             (if (<= z 0.08)
                               (- (+ 1.0 (+ t_1 (sqrt (+ 1.0 z)))) (sqrt x))
                               (+ (sqrt (+ 1.0 x)) (- t_1 (+ (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 <= 0.08) {
                          		tmp = (1.0 + (t_1 + sqrt((1.0 + z)))) - sqrt(x);
                          	} else {
                          		tmp = sqrt((1.0 + x)) + (t_1 - (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 <= 0.08d0) then
                                  tmp = (1.0d0 + (t_1 + sqrt((1.0d0 + z)))) - sqrt(x)
                              else
                                  tmp = sqrt((1.0d0 + x)) + (t_1 - (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 <= 0.08) {
                          		tmp = (1.0 + (t_1 + Math.sqrt((1.0 + z)))) - Math.sqrt(x);
                          	} else {
                          		tmp = Math.sqrt((1.0 + x)) + (t_1 - (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 <= 0.08:
                          		tmp = (1.0 + (t_1 + math.sqrt((1.0 + z)))) - math.sqrt(x)
                          	else:
                          		tmp = math.sqrt((1.0 + x)) + (t_1 - (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 <= 0.08)
                          		tmp = Float64(Float64(1.0 + Float64(t_1 + sqrt(Float64(1.0 + z)))) - sqrt(x));
                          	else
                          		tmp = Float64(sqrt(Float64(1.0 + x)) + Float64(t_1 - 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 <= 0.08)
                          		tmp = (1.0 + (t_1 + sqrt((1.0 + z)))) - sqrt(x);
                          	else
                          		tmp = sqrt((1.0 + x)) + (t_1 - (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, 0.08], N[(N[(1.0 + N[(t$95$1 + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 - 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 0.08:\\
                          \;\;\;\;\left(1 + \left(t\_1 + \sqrt{1 + z}\right)\right) - \sqrt{x}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\sqrt{1 + x} + \left(t\_1 - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < 0.0800000000000000017

                            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.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+18.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. +-commutative18.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. Simplified18.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 x around 0 12.3%

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

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

                            if 0.0800000000000000017 < z

                            1. Initial program 83.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 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.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. +-commutative15.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. Simplified15.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 z around inf 30.4%

                              \[\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 simplification21.0%

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

                          Alternative 20: 80.5% accurate, 2.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 0.026:\\ \;\;\;\;\left(1 + \left(t\_1 + \sqrt{1 + z}\right)\right) - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(t\_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
                           (let* ((t_1 (sqrt (+ y 1.0))))
                             (if (<= z 0.026)
                               (- (+ 1.0 (+ t_1 (sqrt (+ 1.0 z)))) (sqrt x))
                               (+ 1.0 (- t_1 (+ (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 <= 0.026) {
                          		tmp = (1.0 + (t_1 + sqrt((1.0 + z)))) - sqrt(x);
                          	} else {
                          		tmp = 1.0 + (t_1 - (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 <= 0.026d0) then
                                  tmp = (1.0d0 + (t_1 + sqrt((1.0d0 + z)))) - sqrt(x)
                              else
                                  tmp = 1.0d0 + (t_1 - (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 <= 0.026) {
                          		tmp = (1.0 + (t_1 + Math.sqrt((1.0 + z)))) - Math.sqrt(x);
                          	} else {
                          		tmp = 1.0 + (t_1 - (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 <= 0.026:
                          		tmp = (1.0 + (t_1 + math.sqrt((1.0 + z)))) - math.sqrt(x)
                          	else:
                          		tmp = 1.0 + (t_1 - (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 <= 0.026)
                          		tmp = Float64(Float64(1.0 + Float64(t_1 + sqrt(Float64(1.0 + z)))) - sqrt(x));
                          	else
                          		tmp = Float64(1.0 + Float64(t_1 - 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 <= 0.026)
                          		tmp = (1.0 + (t_1 + sqrt((1.0 + z)))) - sqrt(x);
                          	else
                          		tmp = 1.0 + (t_1 - (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, 0.026], N[(N[(1.0 + N[(t$95$1 + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(t$95$1 - 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 0.026:\\
                          \;\;\;\;\left(1 + \left(t\_1 + \sqrt{1 + z}\right)\right) - \sqrt{x}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;1 + \left(t\_1 - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < 0.0259999999999999988

                            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.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+18.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. +-commutative18.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. Simplified18.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 x around 0 12.3%

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

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

                            if 0.0259999999999999988 < z

                            1. Initial program 83.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 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.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. +-commutative15.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. Simplified15.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 3.3%

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

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

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

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

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

                          Alternative 21: 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 0.82:\\ \;\;\;\;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 0.82)
                             (+ 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 <= 0.82) {
                          		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 <= 0.82d0) 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 <= 0.82) {
                          		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 <= 0.82:
                          		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 <= 0.82)
                          		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 <= 0.82)
                          		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, 0.82], 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 0.82:\\
                          \;\;\;\;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 < 0.819999999999999951

                            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 14.9%

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

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

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

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

                            if 0.819999999999999951 < 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. neg-mul-14.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 0.82:\\ \;\;\;\;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 22: 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. neg-mul-123.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. neg-mul-13.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 23: 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. neg-mul-123.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. neg-mul-13.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 24: 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. neg-mul-123.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. neg-mul-13.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 25: 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:\\ \;\;\;\;1 + \left(x \cdot \left(0.5 + x \cdot \left(x \cdot 0.0625 - 0.125\right)\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.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(1.0 + Float64(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[(1.0 + N[(N[(x * N[(0.5 + N[(x * N[(N[(x * 0.0625), $MachinePrecision] - 0.125), $MachinePrecision]), $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.32:\\
                          \;\;\;\;1 + \left(x \cdot \left(0.5 + x \cdot \left(x \cdot 0.0625 - 0.125\right)\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.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. neg-mul-122.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}} \]
                            10. Step-by-step derivation
                              1. associate--l+22.6%

                                \[\leadsto \color{blue}{1 + \left(x \cdot \left(0.5 + x \cdot \left(0.0625 \cdot x - 0.125\right)\right) - \sqrt{x}\right)} \]
                              2. fmm-def22.6%

                                \[\leadsto 1 + \left(x \cdot \left(0.5 + x \cdot \color{blue}{\mathsf{fma}\left(0.0625, x, -0.125\right)}\right) - \sqrt{x}\right) \]
                              3. metadata-eval22.6%

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

                              \[\leadsto \color{blue}{1 + \left(x \cdot \left(0.5 + x \cdot \mathsf{fma}\left(0.0625, x, -0.125\right)\right) - \sqrt{x}\right)} \]
                            12. Taylor expanded in x around 0 22.6%

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

                            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. neg-mul-14.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:\\ \;\;\;\;1 + \left(x \cdot \left(0.5 + x \cdot \left(x \cdot 0.0625 - 0.125\right)\right) - \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\ \end{array} \]
                          5. Add Preprocessing

                          Alternative 26: 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 0.65:\\ \;\;\;\;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 0.65)
                             (+ 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 <= 0.65) {
                          		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 <= 0.65d0) 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 <= 0.65) {
                          		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 <= 0.65:
                          		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 <= 0.65)
                          		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 <= 0.65)
                          		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, 0.65], 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 0.65:\\
                          \;\;\;\;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 < 0.650000000000000022

                            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. neg-mul-122.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 0.650000000000000022 < 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. neg-mul-14.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 0.65:\\ \;\;\;\;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 27: 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. neg-mul-122.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. neg-mul-14.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 28: 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. neg-mul-122.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. neg-mul-14.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 29: 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.065:\\ \;\;\;\;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.065) (- 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.065) {
                          		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.065d0) 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.065) {
                          		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.065:
                          		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.065)
                          		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.065)
                          		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.065], 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.065:\\
                          \;\;\;\;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.065000000000000002

                            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+30.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. +-commutative30.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. Simplified30.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 22.7%

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

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

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

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

                            if 0.065000000000000002 < x

                            1. Initial program 84.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. Taylor expanded in t around inf 4.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+6.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. +-commutative6.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. Simplified6.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 inf 4.7%

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

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

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

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

                          Alternative 30: 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. neg-mul-112.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 31: 1.7% accurate, 8.1× speedup?

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

                              \[\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-sqrt73.7%

                              \[\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-sqrt91.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-rr91.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}}} \]
                          5. Taylor expanded in y around 0 15.6%

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

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

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

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

                            \[\leadsto \color{blue}{-1 \cdot \sqrt{y}} \]
                          9. Step-by-step derivation
                            1. mul-1-neg1.6%

                              \[\leadsto \color{blue}{-\sqrt{y}} \]
                          10. Simplified1.6%

                            \[\leadsto \color{blue}{-\sqrt{y}} \]
                          11. 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))))