Average Error: 5.1 → 0.2
Time: 28.7s
Precision: binary64
Cost: 79044
\[ \begin{array}{c}[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \end{array} \]
\[\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
\[\begin{array}{l} t_1 := \sqrt{x + 1}\\ t_2 := \sqrt{1 + z} + \sqrt{z}\\ t_3 := \frac{1}{\sqrt{1 + y} + \sqrt{y}}\\ t_4 := \sqrt{1 + t}\\ \mathbf{if}\;t_1 - \sqrt{x} \leq 5 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{expm1}\left(\mathsf{log1p}\left(t_3 + \frac{1}{t_1 + \sqrt{x}}\right)\right) + \left(\frac{1}{t_2} + \left(t_4 - \sqrt{t}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_1 + \left(t_3 - \sqrt{x}\right)\right) + \left(\frac{1}{t_4 + \sqrt{t}} - \frac{-1}{t_2}\right)\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+
  (+
   (+ (- (sqrt (+ x 1.0)) (sqrt x)) (- (sqrt (+ y 1.0)) (sqrt y)))
   (- (sqrt (+ z 1.0)) (sqrt z)))
  (- (sqrt (+ t 1.0)) (sqrt t))))
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (sqrt (+ x 1.0)))
        (t_2 (+ (sqrt (+ 1.0 z)) (sqrt z)))
        (t_3 (/ 1.0 (+ (sqrt (+ 1.0 y)) (sqrt y))))
        (t_4 (sqrt (+ 1.0 t))))
   (if (<= (- t_1 (sqrt x)) 5e-5)
     (+
      (expm1 (log1p (+ t_3 (/ 1.0 (+ t_1 (sqrt x))))))
      (+ (/ 1.0 t_2) (- t_4 (sqrt t))))
     (+ (+ t_1 (- t_3 (sqrt x))) (- (/ 1.0 (+ t_4 (sqrt t))) (/ -1.0 t_2))))))
double code(double x, double y, double z, double t) {
	return (((sqrt((x + 1.0)) - sqrt(x)) + (sqrt((y + 1.0)) - sqrt(y))) + (sqrt((z + 1.0)) - sqrt(z))) + (sqrt((t + 1.0)) - sqrt(t));
}
double code(double x, double y, double z, double t) {
	double t_1 = sqrt((x + 1.0));
	double t_2 = sqrt((1.0 + z)) + sqrt(z);
	double t_3 = 1.0 / (sqrt((1.0 + y)) + sqrt(y));
	double t_4 = sqrt((1.0 + t));
	double tmp;
	if ((t_1 - sqrt(x)) <= 5e-5) {
		tmp = expm1(log1p((t_3 + (1.0 / (t_1 + sqrt(x)))))) + ((1.0 / t_2) + (t_4 - sqrt(t)));
	} else {
		tmp = (t_1 + (t_3 - sqrt(x))) + ((1.0 / (t_4 + sqrt(t))) - (-1.0 / t_2));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	return (((Math.sqrt((x + 1.0)) - Math.sqrt(x)) + (Math.sqrt((y + 1.0)) - Math.sqrt(y))) + (Math.sqrt((z + 1.0)) - Math.sqrt(z))) + (Math.sqrt((t + 1.0)) - Math.sqrt(t));
}
public static double code(double x, double y, double z, double t) {
	double t_1 = Math.sqrt((x + 1.0));
	double t_2 = Math.sqrt((1.0 + z)) + Math.sqrt(z);
	double t_3 = 1.0 / (Math.sqrt((1.0 + y)) + Math.sqrt(y));
	double t_4 = Math.sqrt((1.0 + t));
	double tmp;
	if ((t_1 - Math.sqrt(x)) <= 5e-5) {
		tmp = Math.expm1(Math.log1p((t_3 + (1.0 / (t_1 + Math.sqrt(x)))))) + ((1.0 / t_2) + (t_4 - Math.sqrt(t)));
	} else {
		tmp = (t_1 + (t_3 - Math.sqrt(x))) + ((1.0 / (t_4 + Math.sqrt(t))) - (-1.0 / t_2));
	}
	return tmp;
}
def code(x, y, z, t):
	return (((math.sqrt((x + 1.0)) - math.sqrt(x)) + (math.sqrt((y + 1.0)) - math.sqrt(y))) + (math.sqrt((z + 1.0)) - math.sqrt(z))) + (math.sqrt((t + 1.0)) - math.sqrt(t))
def code(x, y, z, t):
	t_1 = math.sqrt((x + 1.0))
	t_2 = math.sqrt((1.0 + z)) + math.sqrt(z)
	t_3 = 1.0 / (math.sqrt((1.0 + y)) + math.sqrt(y))
	t_4 = math.sqrt((1.0 + t))
	tmp = 0
	if (t_1 - math.sqrt(x)) <= 5e-5:
		tmp = math.expm1(math.log1p((t_3 + (1.0 / (t_1 + math.sqrt(x)))))) + ((1.0 / t_2) + (t_4 - math.sqrt(t)))
	else:
		tmp = (t_1 + (t_3 - math.sqrt(x))) + ((1.0 / (t_4 + math.sqrt(t))) - (-1.0 / t_2))
	return tmp
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(sqrt(Float64(x + 1.0)) - sqrt(x)) + Float64(sqrt(Float64(y + 1.0)) - sqrt(y))) + Float64(sqrt(Float64(z + 1.0)) - sqrt(z))) + Float64(sqrt(Float64(t + 1.0)) - sqrt(t)))
end
function code(x, y, z, t)
	t_1 = sqrt(Float64(x + 1.0))
	t_2 = Float64(sqrt(Float64(1.0 + z)) + sqrt(z))
	t_3 = Float64(1.0 / Float64(sqrt(Float64(1.0 + y)) + sqrt(y)))
	t_4 = sqrt(Float64(1.0 + t))
	tmp = 0.0
	if (Float64(t_1 - sqrt(x)) <= 5e-5)
		tmp = Float64(expm1(log1p(Float64(t_3 + Float64(1.0 / Float64(t_1 + sqrt(x)))))) + Float64(Float64(1.0 / t_2) + Float64(t_4 - sqrt(t))));
	else
		tmp = Float64(Float64(t_1 + Float64(t_3 - sqrt(x))) + Float64(Float64(1.0 / Float64(t_4 + sqrt(t))) - Float64(-1.0 / t_2)));
	end
	return tmp
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(z + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 / N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$1 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], 5e-5], N[(N[(Exp[N[Log[1 + N[(t$95$3 + N[(1.0 / N[(t$95$1 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision] + N[(N[(1.0 / t$95$2), $MachinePrecision] + N[(t$95$4 - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(t$95$3 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(t$95$4 + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right)
\begin{array}{l}
t_1 := \sqrt{x + 1}\\
t_2 := \sqrt{1 + z} + \sqrt{z}\\
t_3 := \frac{1}{\sqrt{1 + y} + \sqrt{y}}\\
t_4 := \sqrt{1 + t}\\
\mathbf{if}\;t_1 - \sqrt{x} \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{expm1}\left(\mathsf{log1p}\left(t_3 + \frac{1}{t_1 + \sqrt{x}}\right)\right) + \left(\frac{1}{t_2} + \left(t_4 - \sqrt{t}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(t_1 + \left(t_3 - \sqrt{x}\right)\right) + \left(\frac{1}{t_4 + \sqrt{t}} - \frac{-1}{t_2}\right)\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.1
Target0.4
Herbie0.2
\[\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) \]

Derivation

  1. Split input into 2 regimes
  2. if (-.f64 (sqrt.f64 (+.f64 x 1)) (sqrt.f64 x)) < 5.00000000000000024e-5

    1. Initial program 59.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. Simplified59.9

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

      [Start]59.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) \]

      associate-+l+ [=>]59.9

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

      associate-+l- [=>]59.9

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

      associate--r- [=>]60.0

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

      remove-double-neg [<=]60.0

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

      associate-+l- [=>]59.9

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

      +-commutative [=>]59.9

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

      remove-double-neg [=>]59.9

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

      sub-neg [=>]59.9

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

      sub-neg [<=]59.9

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

      +-commutative [=>]59.9

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

      +-commutative [=>]59.9

      \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \left(\sqrt{1 + y} - \sqrt{y}\right)\right)\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{\color{blue}{1 + t}} - \sqrt{t}\right)\right) \]
    3. Applied egg-rr57.7

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

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

      [Start]57.7

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

      +-commutative [=>]57.7

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

      +-inverses [=>]57.7

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

      metadata-eval [=>]57.7

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

      *-lft-identity [=>]57.7

      \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \left(\sqrt{1 + y} - \sqrt{y}\right)\right)\right) + \left(\color{blue}{\frac{1}{\sqrt{1 + z} + \sqrt{z}}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]
    5. Applied egg-rr57.7

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

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

      [Start]57.7

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

      +-commutative [=>]57.7

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

      +-inverses [=>]57.7

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

      metadata-eval [=>]57.7

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

      *-lft-identity [=>]57.7

      \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \color{blue}{\frac{1}{\sqrt{1 + y} + \sqrt{y}}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]
    7. Applied egg-rr56.5

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)\right)} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]
    8. Applied egg-rr53.3

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

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

      [Start]53.3

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \left(x + \left(1 - x\right)\right) \cdot \frac{1}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      *-commutative [=>]53.3

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

      associate-*l/ [=>]53.3

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

      associate-*r/ [<=]53.3

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

      metadata-eval [<=]53.3

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

      metadata-eval [<=]53.3

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

      metadata-eval [<=]53.3

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

      times-frac [<=]53.3

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

      metadata-eval [=>]53.3

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

      neg-mul-1 [<=]53.3

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

      associate-/r* [=>]53.3

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \color{blue}{\frac{\frac{-\left(x + \left(1 - x\right)\right)}{-1}}{\sqrt{x + 1} + \sqrt{x}}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      neg-mul-1 [=>]53.3

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

      metadata-eval [<=]53.3

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

      *-commutative [=>]53.3

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

      associate-/l* [=>]53.3

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{\color{blue}{\frac{x + \left(1 - x\right)}{\frac{-1}{-1}}}}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      metadata-eval [=>]53.3

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{\frac{x + \left(1 - x\right)}{\frac{\color{blue}{-1}}{-1}}}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      metadata-eval [=>]53.3

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{\frac{x + \left(1 - x\right)}{\frac{-1}{\color{blue}{-1}}}}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      metadata-eval [=>]53.3

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{\frac{x + \left(1 - x\right)}{\color{blue}{1}}}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      /-rgt-identity [=>]53.3

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{\color{blue}{x + \left(1 - x\right)}}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      +-commutative [=>]53.3

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{\color{blue}{\left(1 - x\right) + x}}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      associate-+l- [=>]0.4

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{\color{blue}{1 - \left(x - x\right)}}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      +-inverses [=>]0.4

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{1 - \color{blue}{0}}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      metadata-eval [=>]0.4

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{\color{blue}{1}}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      +-commutative [=>]0.4

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{1}{\color{blue}{\sqrt{x} + \sqrt{x + 1}}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

      +-commutative [=>]0.4

      \[ \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{1}{\sqrt{x} + \sqrt{\color{blue}{1 + x}}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) \]

    if 5.00000000000000024e-5 < (-.f64 (sqrt.f64 (+.f64 x 1)) (sqrt.f64 x))

    1. Initial program 2.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. Simplified2.1

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

      [Start]2.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) \]

      associate-+l+ [=>]2.1

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

      associate-+l- [=>]2.1

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

      associate--r- [=>]2.9

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

      remove-double-neg [<=]2.9

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

      associate-+l- [=>]2.1

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

      +-commutative [=>]2.1

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

      remove-double-neg [=>]2.1

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

      sub-neg [=>]2.1

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

      sub-neg [<=]2.1

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

      +-commutative [=>]2.1

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

      +-commutative [=>]2.1

      \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \left(\sqrt{1 + y} - \sqrt{y}\right)\right)\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{\color{blue}{1 + t}} - \sqrt{t}\right)\right) \]
    3. Applied egg-rr1.3

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

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

      [Start]1.3

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

      +-commutative [=>]1.3

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

      +-inverses [=>]1.3

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

      metadata-eval [=>]1.3

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

      *-lft-identity [=>]1.3

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

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

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

      [Start]0.5

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

      +-commutative [=>]0.5

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

      +-inverses [=>]0.5

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

      metadata-eval [=>]0.5

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

      *-lft-identity [=>]0.5

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

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

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

      [Start]0.3

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

      *-commutative [=>]0.3

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

      associate--l+ [=>]0.1

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

      distribute-rgt-in [=>]0.1

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

      +-inverses [=>]0.1

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

      +-inverses [<=]0.1

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

      distribute-rgt-out [=>]0.1

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

      +-commutative [=>]0.1

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

      +-inverses [=>]0.1

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

      metadata-eval [=>]0.1

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

      *-rgt-identity [=>]0.1

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{x + 1} - \sqrt{x} \leq 5 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{1}{\sqrt{x + 1} + \sqrt{x}}\right)\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{x + 1} + \left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} - \sqrt{x}\right)\right) + \left(\frac{1}{\sqrt{1 + t} + \sqrt{t}} - \frac{-1}{\sqrt{1 + z} + \sqrt{z}}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error0.8
Cost79556
\[\begin{array}{l} t_1 := \sqrt{1 + z}\\ t_2 := \sqrt{x + 1}\\ t_3 := \sqrt{1 + y}\\ \mathbf{if}\;\left(\left(t_2 - \sqrt{x}\right) + \left(t_3 - \sqrt{y}\right)\right) + \left(t_1 - \sqrt{z}\right) \leq 0.99999999999998:\\ \;\;\;\;\frac{1}{t_2 + \sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sqrt{1 + t} + \sqrt{t}} - \frac{-1}{t_1 + \sqrt{z}}\right) + \left(1 + \frac{1}{t_3 + \sqrt{y}}\right)\\ \end{array} \]
Alternative 2
Error0.6
Cost66244
\[\begin{array}{l} t_1 := \sqrt{x + 1}\\ \mathbf{if}\;t_1 - \sqrt{x} \leq 0.99995:\\ \;\;\;\;\frac{1}{t_1 + \sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;\left(t_1 + \left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} - \sqrt{x}\right)\right) + \left(\frac{1}{\sqrt{1 + t} + \sqrt{t}} - \frac{-1}{\sqrt{1 + z} + \sqrt{z}}\right)\\ \end{array} \]
Alternative 3
Error1.2
Cost40004
\[\begin{array}{l} \mathbf{if}\;y \leq 6.8 \cdot 10^{+31}:\\ \;\;\;\;\left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) + \left(1 + \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{x + 1} + \sqrt{x}}\\ \end{array} \]
Alternative 4
Error1.8
Cost39876
\[\begin{array}{l} \mathbf{if}\;y \leq 2.95 \cdot 10^{+22}:\\ \;\;\;\;\left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) + \left(1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{x + 1} + \sqrt{x}}\\ \end{array} \]
Alternative 5
Error2.6
Cost39748
\[\begin{array}{l} t_1 := \sqrt{1 + z}\\ t_2 := \sqrt{1 + y}\\ t_3 := \sqrt{x + 1}\\ \mathbf{if}\;y \leq 1.05 \cdot 10^{-104}:\\ \;\;\;\;1 + \left(\left(t_2 - \left(\sqrt{z} - t_1\right)\right) + \left(\sqrt{1 + t} - \left(\sqrt{y} + \sqrt{t}\right)\right)\right)\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+22}:\\ \;\;\;\;t_3 + \left(\frac{1}{t_1 + \sqrt{z}} + \left(t_2 - \sqrt{y}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{t_3 + \sqrt{x}}\\ \end{array} \]
Alternative 6
Error2.5
Cost39748
\[\begin{array}{l} \mathbf{if}\;y \leq 2.95 \cdot 10^{+22}:\\ \;\;\;\;\left(\left(1 + \sqrt{1 + y}\right) - \sqrt{y}\right) + \left(\left(\sqrt{1 + t} - \sqrt{t}\right) - \left(\sqrt{z} - \sqrt{1 + z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{x + 1} + \sqrt{x}}\\ \end{array} \]
Alternative 7
Error5.1
Cost39620
\[\begin{array}{l} t_1 := \sqrt{1 + z}\\ \mathbf{if}\;t \leq 1.6 \cdot 10^{+14}:\\ \;\;\;\;1 + \left(\left(1 + \left(t_1 + \sqrt{1 + t}\right)\right) - \left(\sqrt{z} + \sqrt{t}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x + 1} + \left(\left(\sqrt{1 + y} - \sqrt{y}\right) - \left(\sqrt{x} + \left(\sqrt{z} - t_1\right)\right)\right)\\ \end{array} \]
Alternative 8
Error5.3
Cost33220
\[\begin{array}{l} t_1 := \sqrt{1 + z}\\ \mathbf{if}\;t \leq 1.6 \cdot 10^{+14}:\\ \;\;\;\;1 + \left(\left(1 + \left(t_1 + \sqrt{1 + t}\right)\right) - \left(\sqrt{z} + \sqrt{t}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x + 1} + \left(\frac{1}{t_1 + \sqrt{z}} + \left(\sqrt{1 + y} - \sqrt{y}\right)\right)\\ \end{array} \]
Alternative 9
Error6.0
Cost33092
\[\begin{array}{l} t_1 := \sqrt{1 + z}\\ \mathbf{if}\;t \leq 1.6 \cdot 10^{+14}:\\ \;\;\;\;1 + \left(\left(1 + \left(t_1 + \sqrt{1 + t}\right)\right) - \left(\sqrt{z} + \sqrt{t}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x + 1} + \left(\left(\sqrt{1 + y} - \sqrt{y}\right) - \left(\sqrt{z} - t_1\right)\right)\\ \end{array} \]
Alternative 10
Error9.6
Cost32904
\[\begin{array}{l} t_1 := \sqrt{1 + y}\\ \mathbf{if}\;z \leq 6.2 \cdot 10^{-136}:\\ \;\;\;\;1 + \left(\left(\sqrt{1 + t} + 2\right) - \sqrt{t}\right)\\ \mathbf{elif}\;z \leq 42000000000000:\\ \;\;\;\;\left(1 + \left(t_1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{y} + \sqrt{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_1 - \sqrt{y}\right) + \left(\mathsf{hypot}\left(1, \sqrt{x}\right) - \sqrt{x}\right)\\ \end{array} \]
Alternative 11
Error9.6
Cost26696
\[\begin{array}{l} t_1 := \sqrt{1 + y}\\ \mathbf{if}\;z \leq 6.2 \cdot 10^{-136}:\\ \;\;\;\;1 + \left(\left(\sqrt{1 + t} + 2\right) - \sqrt{t}\right)\\ \mathbf{elif}\;z \leq 70000000000000:\\ \;\;\;\;t_1 + \left(\left(1 + \sqrt{1 + z}\right) - \left(\sqrt{y} + \sqrt{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x + 1} + \left(\left(t_1 - \sqrt{y}\right) - \sqrt{x}\right)\\ \end{array} \]
Alternative 12
Error9.5
Cost26696
\[\begin{array}{l} t_1 := \sqrt{1 + y}\\ \mathbf{if}\;z \leq 6.2 \cdot 10^{-136}:\\ \;\;\;\;1 + \left(\left(\sqrt{1 + t} + 2\right) - \sqrt{t}\right)\\ \mathbf{elif}\;z \leq 50000000000000:\\ \;\;\;\;\left(1 + \left(t_1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{y} + \sqrt{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x + 1} + \left(\left(t_1 - \sqrt{y}\right) - \sqrt{x}\right)\\ \end{array} \]
Alternative 13
Error9.9
Cost26568
\[\begin{array}{l} t_1 := \sqrt{x + 1}\\ \mathbf{if}\;z \leq 6.2 \cdot 10^{-136}:\\ \;\;\;\;1 + \left(\left(\sqrt{1 + t} + 2\right) - \sqrt{t}\right)\\ \mathbf{elif}\;z \leq 680000000000:\\ \;\;\;\;\left(1 + \left(t_1 + \sqrt{1 + z}\right)\right) - \sqrt{z}\\ \mathbf{else}:\\ \;\;\;\;t_1 + \left(\left(\sqrt{1 + y} - \sqrt{y}\right) - \sqrt{x}\right)\\ \end{array} \]
Alternative 14
Error10.7
Cost20168
\[\begin{array}{l} \mathbf{if}\;z \leq 6.2 \cdot 10^{-136}:\\ \;\;\;\;1 + \left(\left(\sqrt{1 + t} + 2\right) - \sqrt{t}\right)\\ \mathbf{elif}\;z \leq 1600000000000:\\ \;\;\;\;\left(1 + \left(\sqrt{x + 1} + \sqrt{1 + z}\right)\right) - \sqrt{z}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\ \end{array} \]
Alternative 15
Error10.7
Cost13640
\[\begin{array}{l} \mathbf{if}\;z \leq 6.2 \cdot 10^{-136}:\\ \;\;\;\;1 + \left(\left(\sqrt{1 + t} + 2\right) - \sqrt{t}\right)\\ \mathbf{elif}\;z \leq 7000000000000:\\ \;\;\;\;1 + \left(\left(1 + \sqrt{1 + z}\right) - \sqrt{z}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\ \end{array} \]
Alternative 16
Error10.2
Cost13508
\[\begin{array}{l} \mathbf{if}\;z \leq 5600000000000:\\ \;\;\;\;1 + \left(\left(1 + \sqrt{1 + z}\right) - \sqrt{z}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\ \end{array} \]
Alternative 17
Error22.1
Cost13384
\[\begin{array}{l} \mathbf{if}\;x \leq 8.8 \cdot 10^{-16}:\\ \;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\ \mathbf{elif}\;x \leq 2050000000000:\\ \;\;\;\;\sqrt{x + 1} - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 18
Error24.4
Cost13380
\[\begin{array}{l} t_1 := \sqrt{x + 1} - \sqrt{x}\\ \mathbf{if}\;y \leq 5:\\ \;\;\;\;1 + t_1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Error19.3
Cost13380
\[\begin{array}{l} \mathbf{if}\;y \leq 8.2 \cdot 10^{+15}:\\ \;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{x + 1} + \sqrt{x}}\\ \end{array} \]
Alternative 20
Error41.2
Cost13120
\[\sqrt{x + 1} - \sqrt{x} \]
Alternative 21
Error41.9
Cost64
\[1 \]

Error

Reproduce

herbie shell --seed 2022364 
(FPCore (x y z t)
  :name "Main:z from "
  :precision binary64

  :herbie-target
  (+ (+ (+ (/ 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)))

  (+ (+ (+ (- (sqrt (+ x 1.0)) (sqrt x)) (- (sqrt (+ y 1.0)) (sqrt y))) (- (sqrt (+ z 1.0)) (sqrt z))) (- (sqrt (+ t 1.0)) (sqrt t))))