?

Average Error: 5.4 → 0.4
Time: 31.0s
Precision: binary64
Cost: 53312

?

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

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.4
Target0.4
Herbie0.4
\[\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. Initial program 5.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. Simplified5.4

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

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

    associate-+l+ [=>]5.4

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

    associate-+l+ [=>]5.4

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

    associate-+r+ [<=]5.4

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

    +-commutative [=>]5.4

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

    +-commutative [=>]5.4

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

    +-commutative [=>]5.4

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

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

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

    [Start]2.5

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

    +-commutative [=>]2.5

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

    +-inverses [=>]2.5

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

    metadata-eval [=>]2.5

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

    *-lft-identity [=>]2.5

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

    +-commutative [=>]2.5

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

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

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

    [Start]2.1

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

    associate-*r/ [=>]2.1

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

    *-rgt-identity [=>]2.1

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

    associate-+r- [=>]2.1

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

    +-commutative [<=]2.1

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

    associate--l+ [=>]1.2

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

    \[\leadsto \frac{1}{\sqrt{x} + \mathsf{hypot}\left(1, \sqrt{x}\right)} + \left(\frac{1 + \left(y - y\right)}{\sqrt{1 + y} + \sqrt{y}} + \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)\right) \]
  8. Simplified0.4

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

    [Start]0.4

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

    +-commutative [=>]0.4

    \[ \frac{1}{\sqrt{x} + \mathsf{hypot}\left(1, \sqrt{x}\right)} + \left(\frac{1 + \left(y - y\right)}{\sqrt{1 + y} + \sqrt{y}} + \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)\right) \]

    +-inverses [=>]0.4

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

    metadata-eval [=>]0.4

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

    *-lft-identity [=>]0.4

    \[ \frac{1}{\sqrt{x} + \mathsf{hypot}\left(1, \sqrt{x}\right)} + \left(\frac{1 + \left(y - y\right)}{\sqrt{1 + y} + \sqrt{y}} + \left(\color{blue}{\frac{1}{\sqrt{1 + z} + \sqrt{z}}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)\right) \]
  9. Applied egg-rr3.3

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

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

    [Start]3.3

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

    expm1-def [=>]0.4

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

    expm1-log1p [=>]0.4

    \[ \color{blue}{\frac{1}{\sqrt{x} + \sqrt{1 + x}}} + \left(\frac{1 + \left(y - y\right)}{\sqrt{1 + y} + \sqrt{y}} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)\right) \]
  11. Final simplification0.4

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

Alternatives

Alternative 1
Error1.2
Cost66500
\[\begin{array}{l} t_1 := \sqrt{1 + y}\\ t_2 := \sqrt{1 + x}\\ \mathbf{if}\;\left(t_1 - \sqrt{y}\right) + \left(t_2 - \sqrt{x}\right) \leq 0.999999999999998:\\ \;\;\;\;\frac{1}{\sqrt{x} + t_2}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{1 + \left(y - y\right)}{t_1 + \sqrt{y}} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)\right)\\ \end{array} \]
Alternative 2
Error1.2
Cost53184
\[\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \left(\frac{1 + \left(y - y\right)}{\sqrt{1 + y} + \sqrt{y}} + \left(\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\sqrt{1 + z} - \sqrt{z}\right)\right)\right) \]
Alternative 3
Error1.7
Cost52932
\[\begin{array}{l} t_1 := \sqrt{1 + x}\\ \mathbf{if}\;x \leq 85000:\\ \;\;\;\;\left(t_1 - \sqrt{x}\right) + \left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} - \left(\left(\sqrt{t} - \sqrt{1 + t}\right) + \left(\sqrt{z} - \sqrt{1 + z}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{x} + t_1}\\ \end{array} \]
Alternative 4
Error1.8
Cost52928
\[\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \left(\left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) + \left(\sqrt{1 + y} - \sqrt{y}\right)\right) \]
Alternative 5
Error2.5
Cost52800
\[\frac{1}{\sqrt{x} + \sqrt{1 + x}} - \left(\left(\sqrt{y} - \sqrt{1 + y}\right) + \left(\left(\sqrt{t} - \sqrt{1 + t}\right) + \left(\sqrt{z} - \sqrt{1 + z}\right)\right)\right) \]
Alternative 6
Error2.0
Cost39876
\[\begin{array}{l} \mathbf{if}\;y \leq 3800000000000:\\ \;\;\;\;1 + \left(\left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) + \left(\sqrt{1 + y} - \sqrt{y}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{x} + \sqrt{1 + x}}\\ \end{array} \]
Alternative 7
Error6.2
Cost39752
\[\begin{array}{l} t_1 := \sqrt{1 + x}\\ t_2 := \sqrt{1 + t} - \sqrt{t}\\ \mathbf{if}\;z \leq 1.1 \cdot 10^{-37}:\\ \;\;\;\;t_2 + 3\\ \mathbf{elif}\;z \leq 53000000000:\\ \;\;\;\;\left(1 + \left(t_1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \sqrt{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + \left(\left(\sqrt{1 + y} - \sqrt{y}\right) + \left(t_2 - \sqrt{x}\right)\right)\\ \end{array} \]
Alternative 8
Error5.9
Cost39752
\[\begin{array}{l} t_1 := \sqrt{1 + x}\\ t_2 := \sqrt{1 + y} - \sqrt{y}\\ \mathbf{if}\;z \leq 3.3 \cdot 10^{-41}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+15}:\\ \;\;\;\;t_1 + \left(t_2 + \left(\sqrt{1 + z} - \left(\sqrt{x} + \sqrt{z}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + \left(t_2 - \sqrt{x}\right)\\ \end{array} \]
Alternative 9
Error3.0
Cost39748
\[\begin{array}{l} t_1 := \sqrt{1 + x}\\ \mathbf{if}\;y \leq 2.8 \cdot 10^{-27}:\\ \;\;\;\;\left(t_1 - \sqrt{x}\right) + \left(1 - \left(\left(\sqrt{t} - \sqrt{1 + t}\right) + \left(\sqrt{z} - \sqrt{1 + z}\right)\right)\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+16}:\\ \;\;\;\;\left(t_1 + \sqrt{1 + y}\right) + \frac{x - y}{\sqrt{y} - \sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{x} + t_1}\\ \end{array} \]
Alternative 10
Error7.6
Cost26700
\[\begin{array}{l} t_1 := \sqrt{1 + x}\\ \mathbf{if}\;y \leq 1.2 \cdot 10^{-197}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-27}:\\ \;\;\;\;2 - \left(\sqrt{z} - \sqrt{1 + z}\right)\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+16}:\\ \;\;\;\;t_1 + \left(\left(\sqrt{1 + y} - \sqrt{x}\right) - \sqrt{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{x} + t_1}\\ \end{array} \]
Alternative 11
Error6.2
Cost26696
\[\begin{array}{l} t_1 := \sqrt{1 + x}\\ \mathbf{if}\;z \leq 3.4 \cdot 10^{-37}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\ \mathbf{elif}\;z \leq 22500000000:\\ \;\;\;\;\left(1 + \left(t_1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \sqrt{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + \left(\left(\sqrt{1 + y} - \sqrt{y}\right) - \sqrt{x}\right)\\ \end{array} \]
Alternative 12
Error6.3
Cost26568
\[\begin{array}{l} \mathbf{if}\;z \leq 5 \cdot 10^{-41}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\ \mathbf{elif}\;z \leq 55000000000:\\ \;\;\;\;\left(\sqrt{1 + z} + 2\right) - \sqrt{z}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 + x} + \left(\left(\sqrt{1 + y} - \sqrt{y}\right) - \sqrt{x}\right)\\ \end{array} \]
Alternative 13
Error7.7
Cost20172
\[\begin{array}{l} \mathbf{if}\;y \leq 1.2 \cdot 10^{-197}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-27}:\\ \;\;\;\;2 - \left(\sqrt{z} - \sqrt{1 + z}\right)\\ \mathbf{elif}\;y \leq 3800000000000:\\ \;\;\;\;\left(1 + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{x} + \sqrt{1 + x}}\\ \end{array} \]
Alternative 14
Error7.8
Cost13644
\[\begin{array}{l} \mathbf{if}\;y \leq 1.2 \cdot 10^{-197}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-27}:\\ \;\;\;\;2 - \left(\sqrt{z} - \sqrt{1 + z}\right)\\ \mathbf{elif}\;y \leq 3800000000000:\\ \;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{x} + \sqrt{1 + x}}\\ \end{array} \]
Alternative 15
Error7.1
Cost13512
\[\begin{array}{l} \mathbf{if}\;z \leq 3.4 \cdot 10^{-37}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\ \mathbf{elif}\;z \leq 35000000000:\\ \;\;\;\;2 - \left(\sqrt{z} - \sqrt{1 + z}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\ \end{array} \]
Alternative 16
Error7.1
Cost13512
\[\begin{array}{l} \mathbf{if}\;z \leq 5 \cdot 10^{-39}:\\ \;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\ \mathbf{elif}\;z \leq 55000000000:\\ \;\;\;\;\left(\sqrt{1 + z} + 2\right) - \sqrt{z}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\ \end{array} \]
Alternative 17
Error22.8
Cost13384
\[\begin{array}{l} \mathbf{if}\;x \leq 1.8 \cdot 10^{-25}:\\ \;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\ \mathbf{elif}\;x \leq 30500000000000:\\ \;\;\;\;\sqrt{1 + x} - \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 18
Error25.2
Cost13380
\[\begin{array}{l} t_1 := \sqrt{1 + x} - \sqrt{x}\\ \mathbf{if}\;y \leq 3.5:\\ \;\;\;\;1 + t_1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Error10.5
Cost13380
\[\begin{array}{l} \mathbf{if}\;z \leq 35000000000:\\ \;\;\;\;2 - \left(\sqrt{z} - \sqrt{1 + z}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\ \end{array} \]
Alternative 20
Error41.4
Cost13120
\[\sqrt{1 + x} - \sqrt{x} \]
Alternative 21
Error42.1
Cost64
\[1 \]

Error

Reproduce?

herbie shell --seed 2023055 
(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))))