| Alternative 1 | |
|---|---|
| Accuracy | 94.5% |
| Cost | 52928 |
(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 (+ 1.0 y)) (sqrt y))) (/ (+ 1.0 (- x x)) (+ (sqrt x) (sqrt (+ 1.0 x))))) (+ (/ 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((1.0 + y)) + sqrt(y))) + ((1.0 + (x - x)) / (sqrt(x) + sqrt((1.0 + x))))) + ((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((1.0d0 + y)) + sqrt(y))) + ((1.0d0 + (x - x)) / (sqrt(x) + sqrt((1.0d0 + x))))) + ((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((1.0 + y)) + Math.sqrt(y))) + ((1.0 + (x - x)) / (Math.sqrt(x) + Math.sqrt((1.0 + x))))) + ((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((1.0 + y)) + math.sqrt(y))) + ((1.0 + (x - x)) / (math.sqrt(x) + math.sqrt((1.0 + x))))) + ((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(Float64(1.0 / Float64(sqrt(Float64(1.0 + y)) + sqrt(y))) + Float64(Float64(1.0 + Float64(x - x)) / Float64(sqrt(x) + sqrt(Float64(1.0 + x))))) + 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((1.0 + y)) + sqrt(y))) + ((1.0 + (x - x)) / (sqrt(x) + sqrt((1.0 + x))))) + ((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[(N[(1.0 / N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 + N[(x - x), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $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]
\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)
\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{1 + \left(x - x\right)}{\sqrt{x} + \sqrt{1 + x}}\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
Results
| Original | 91.8% |
|---|---|
| Target | 99.4% |
| Herbie | 99.4% |
Initial program 91.8%
Simplified91.8%
[Start]91.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)
\] |
|---|---|
associate-+l+ [=>]91.8 | \[ \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- [=>]91.8 | \[ \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- [=>]90.6 | \[ \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 [<=]90.6 | \[ \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- [=>]91.8 | \[ \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 [=>]91.8 | \[ \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 [=>]91.8 | \[ \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 [=>]91.8 | \[ \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 [<=]91.8 | \[ \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 [=>]91.8 | \[ \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)
\] |
Applied egg-rr93.0%
[Start]91.8 | \[ \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)
\] |
|---|---|
flip-- [=>]92.0 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \color{blue}{\frac{\sqrt{1 + y} \cdot \sqrt{1 + y} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{1 + y} + \sqrt{y}}}\right)\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
div-inv [=>]92.0 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \color{blue}{\left(\sqrt{1 + y} \cdot \sqrt{1 + y} - \sqrt{y} \cdot \sqrt{y}\right) \cdot \frac{1}{\sqrt{1 + y} + \sqrt{y}}}\right)\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
add-sqr-sqrt [<=]82.8 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \left(\color{blue}{\left(1 + y\right)} - \sqrt{y} \cdot \sqrt{y}\right) \cdot \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
add-sqr-sqrt [<=]92.4 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \left(\left(1 + y\right) - \color{blue}{y}\right) \cdot \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
associate--l+ [=>]93.0 | \[ \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(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
Simplified93.0%
[Start]93.0 | \[ \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(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
|---|---|
+-commutative [=>]93.0 | \[ \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(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
+-inverses [=>]93.0 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \left(\color{blue}{0} + 1\right) \cdot \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
metadata-eval [=>]93.0 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \color{blue}{1} \cdot \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
*-lft-identity [=>]93.0 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \color{blue}{\frac{1}{\sqrt{1 + y} + \sqrt{y}}}\right)\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
Applied egg-rr94.5%
[Start]93.0 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
|---|---|
flip-- [=>]93.2 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\color{blue}{\frac{\sqrt{1 + z} \cdot \sqrt{1 + z} - \sqrt{z} \cdot \sqrt{z}}{\sqrt{1 + z} + \sqrt{z}}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
div-inv [=>]93.2 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\color{blue}{\left(\sqrt{1 + z} \cdot \sqrt{1 + z} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
add-sqr-sqrt [<=]66.2 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\left(\color{blue}{\left(1 + z\right)} - \sqrt{z} \cdot \sqrt{z}\right) \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
add-sqr-sqrt [<=]93.6 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\left(\left(1 + z\right) - \color{blue}{z}\right) \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
associate--l+ [=>]94.5 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\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)
\] |
Simplified94.5%
[Start]94.5 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\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 [=>]94.5 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\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 [=>]94.5 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\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 [=>]94.5 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\color{blue}{1} \cdot \frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
*-lft-identity [=>]94.5 | \[ \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\color{blue}{\frac{1}{\sqrt{1 + z} + \sqrt{z}}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
Applied egg-rr94.6%
[Start]94.5 | \[ \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(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
|---|---|
add-cbrt-cube [=>]94.4 | \[ \color{blue}{\sqrt[3]{\left(\left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) \cdot \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right)\right) \cdot \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(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
pow1/3 [=>]94.5 | \[ \color{blue}{{\left(\left(\left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) \cdot \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right)\right) \cdot \left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right)\right)}^{0.3333333333333333}} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
pow3 [=>]94.5 | \[ {\color{blue}{\left({\left(\sqrt{x + 1} - \left(\sqrt{x} - \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right)}^{3}\right)}}^{0.3333333333333333} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
associate--r- [=>]94.6 | \[ {\left({\color{blue}{\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)}}^{3}\right)}^{0.3333333333333333} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
+-commutative [=>]94.6 | \[ {\left({\color{blue}{\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)}}^{3}\right)}^{0.3333333333333333} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
Applied egg-rr94.5%
[Start]94.6 | \[ {\left({\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)}^{3}\right)}^{0.3333333333333333} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
|---|---|
pow-pow [=>]94.6 | \[ \color{blue}{{\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)}^{\left(3 \cdot 0.3333333333333333\right)}} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
metadata-eval [=>]94.6 | \[ {\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)}^{\color{blue}{1}} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
pow1 [<=]94.6 | \[ \color{blue}{\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \left(\sqrt{x + 1} - \sqrt{x}\right)\right)} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
+-commutative [=>]94.6 | \[ \color{blue}{\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
flip-- [=>]94.7 | \[ \left(\color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}} + \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
add-sqr-sqrt [<=]94.7 | \[ \left(\frac{\color{blue}{\left(x + 1\right)} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}} + \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
add-sqr-sqrt [<=]95.0 | \[ \left(\frac{\left(x + 1\right) - \color{blue}{x}}{\sqrt{x + 1} + \sqrt{x}} + \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
div-sub [=>]94.6 | \[ \left(\color{blue}{\left(\frac{x + 1}{\sqrt{x + 1} + \sqrt{x}} - \frac{x}{\sqrt{x + 1} + \sqrt{x}}\right)} + \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
associate-+l- [=>]94.5 | \[ \color{blue}{\left(\frac{x + 1}{\sqrt{x + 1} + \sqrt{x}} - \left(\frac{x}{\sqrt{x + 1} + \sqrt{x}} - \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)
\] |
Simplified99.4%
[Start]94.5 | \[ \left(\frac{x + 1}{\sqrt{x + 1} + \sqrt{x}} - \left(\frac{x}{\sqrt{x + 1} + \sqrt{x}} - \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)
\] |
|---|---|
associate--r- [=>]94.6 | \[ \color{blue}{\left(\left(\frac{x + 1}{\sqrt{x + 1} + \sqrt{x}} - \frac{x}{\sqrt{x + 1} + \sqrt{x}}\right) + \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
+-commutative [<=]94.6 | \[ \color{blue}{\left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \left(\frac{x + 1}{\sqrt{x + 1} + \sqrt{x}} - \frac{x}{\sqrt{x + 1} + \sqrt{x}}\right)\right)} + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
div-sub [<=]95.0 | \[ \left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \color{blue}{\frac{\left(x + 1\right) - x}{\sqrt{x + 1} + \sqrt{x}}}\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
+-commutative [=>]95.0 | \[ \left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{\color{blue}{\left(1 + x\right)} - x}{\sqrt{x + 1} + \sqrt{x}}\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
associate--l+ [=>]99.4 | \[ \left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{\color{blue}{1 + \left(x - x\right)}}{\sqrt{x + 1} + \sqrt{x}}\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
+-commutative [=>]99.4 | \[ \left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{1 + \left(x - x\right)}{\color{blue}{\sqrt{x} + \sqrt{x + 1}}}\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
+-commutative [=>]99.4 | \[ \left(\frac{1}{\sqrt{1 + y} + \sqrt{y}} + \frac{1 + \left(x - x\right)}{\sqrt{x} + \sqrt{\color{blue}{1 + x}}}\right) + \left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\] |
Final simplification99.4%
| Alternative 1 | |
|---|---|
| Accuracy | 94.5% |
| Cost | 52928 |
| Alternative 2 | |
|---|---|
| Accuracy | 93.3% |
| Cost | 52800 |
| Alternative 3 | |
|---|---|
| Accuracy | 93.0% |
| Cost | 52800 |
| Alternative 4 | |
|---|---|
| Accuracy | 92.8% |
| Cost | 39876 |
| Alternative 5 | |
|---|---|
| Accuracy | 92.1% |
| Cost | 39872 |
| Alternative 6 | |
|---|---|
| Accuracy | 93.0% |
| Cost | 39872 |
| Alternative 7 | |
|---|---|
| Accuracy | 91.7% |
| Cost | 39744 |
| Alternative 8 | |
|---|---|
| Accuracy | 84.7% |
| Cost | 26696 |
| Alternative 9 | |
|---|---|
| Accuracy | 89.9% |
| Cost | 26696 |
| Alternative 10 | |
|---|---|
| Accuracy | 90.8% |
| Cost | 26696 |
| Alternative 11 | |
|---|---|
| Accuracy | 92.5% |
| Cost | 26692 |
| Alternative 12 | |
|---|---|
| Accuracy | 83.9% |
| Cost | 26568 |
| Alternative 13 | |
|---|---|
| Accuracy | 83.9% |
| Cost | 26568 |
| Alternative 14 | |
|---|---|
| Accuracy | 84.7% |
| Cost | 26568 |
| Alternative 15 | |
|---|---|
| Accuracy | 83.8% |
| Cost | 13512 |
| Alternative 16 | |
|---|---|
| Accuracy | 83.8% |
| Cost | 13512 |
| Alternative 17 | |
|---|---|
| Accuracy | 81.0% |
| Cost | 13380 |
| Alternative 18 | |
|---|---|
| Accuracy | 35.2% |
| Cost | 13248 |
| Alternative 19 | |
|---|---|
| Accuracy | 34.5% |
| Cost | 64 |
herbie shell --seed 2023130
(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))))