
(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:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (sqrt (+ 1.0 z)) (sqrt z))) (t_2 (sqrt (+ 1.0 y))))
(if (<= t_1 0.0001)
(+
(+ (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))) (/ 1.0 (+ (sqrt y) t_2)))
(* 0.5 (sqrt (/ 1.0 z))))
(+
(+ (- 1.0 (sqrt x)) (- t_2 (sqrt y)))
(+ t_1 (/ 1.0 (+ (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((1.0 + z)) - sqrt(z);
double t_2 = sqrt((1.0 + y));
double tmp;
if (t_1 <= 0.0001) {
tmp = ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (sqrt(y) + t_2))) + (0.5 * sqrt((1.0 / z)));
} else {
tmp = ((1.0 - sqrt(x)) + (t_2 - sqrt(y))) + (t_1 + (1.0 / (sqrt((1.0 + t)) + sqrt(t))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((1.0d0 + z)) - sqrt(z)
t_2 = sqrt((1.0d0 + y))
if (t_1 <= 0.0001d0) then
tmp = ((1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))) + (1.0d0 / (sqrt(y) + t_2))) + (0.5d0 * sqrt((1.0d0 / z)))
else
tmp = ((1.0d0 - sqrt(x)) + (t_2 - sqrt(y))) + (t_1 + (1.0d0 / (sqrt((1.0d0 + t)) + sqrt(t))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + z)) - Math.sqrt(z);
double t_2 = Math.sqrt((1.0 + y));
double tmp;
if (t_1 <= 0.0001) {
tmp = ((1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))) + (1.0 / (Math.sqrt(y) + t_2))) + (0.5 * Math.sqrt((1.0 / z)));
} else {
tmp = ((1.0 - Math.sqrt(x)) + (t_2 - Math.sqrt(y))) + (t_1 + (1.0 / (Math.sqrt((1.0 + t)) + Math.sqrt(t))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + z)) - math.sqrt(z) t_2 = math.sqrt((1.0 + y)) tmp = 0 if t_1 <= 0.0001: tmp = ((1.0 / (math.sqrt(x) + math.sqrt((1.0 + x)))) + (1.0 / (math.sqrt(y) + t_2))) + (0.5 * math.sqrt((1.0 / z))) else: tmp = ((1.0 - math.sqrt(x)) + (t_2 - math.sqrt(y))) + (t_1 + (1.0 / (math.sqrt((1.0 + t)) + math.sqrt(t)))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) t_2 = sqrt(Float64(1.0 + y)) tmp = 0.0 if (t_1 <= 0.0001) tmp = Float64(Float64(Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))) + Float64(1.0 / Float64(sqrt(y) + t_2))) + Float64(0.5 * sqrt(Float64(1.0 / z)))); else tmp = Float64(Float64(Float64(1.0 - sqrt(x)) + Float64(t_2 - sqrt(y))) + Float64(t_1 + Float64(1.0 / Float64(sqrt(Float64(1.0 + t)) + sqrt(t))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + z)) - sqrt(z);
t_2 = sqrt((1.0 + y));
tmp = 0.0;
if (t_1 <= 0.0001)
tmp = ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (sqrt(y) + t_2))) + (0.5 * sqrt((1.0 / z)));
else
tmp = ((1.0 - sqrt(x)) + (t_2 - sqrt(y))) + (t_1 + (1.0 / (sqrt((1.0 + t)) + sqrt(t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0001], N[(N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(1.0 / N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z} - \sqrt{z}\\
t_2 := \sqrt{1 + y}\\
\mathbf{if}\;t\_1 \leq 0.0001:\\
\;\;\;\;\left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{\sqrt{y} + t\_2}\right) + 0.5 \cdot \sqrt{\frac{1}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(1 - \sqrt{x}\right) + \left(t\_2 - \sqrt{y}\right)\right) + \left(t\_1 + \frac{1}{\sqrt{1 + t} + \sqrt{t}}\right)\\
\end{array}
\end{array}
if (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)) < 1.00000000000000005e-4Initial program 86.4%
associate-+l+86.4%
sub-neg86.4%
sub-neg86.4%
+-commutative86.4%
+-commutative86.4%
+-commutative86.4%
Simplified86.4%
flip--86.4%
div-inv86.4%
add-sqr-sqrt71.0%
add-sqr-sqrt86.4%
associate--l+88.5%
Applied egg-rr88.5%
+-inverses88.5%
metadata-eval88.5%
*-lft-identity88.5%
+-commutative88.5%
Simplified88.5%
flip--88.6%
div-inv88.6%
add-sqr-sqrt67.8%
+-commutative67.8%
add-sqr-sqrt88.6%
+-commutative88.6%
Applied egg-rr88.6%
associate--l+92.2%
+-inverses92.2%
metadata-eval92.2%
*-lft-identity92.2%
+-commutative92.2%
Simplified92.2%
Taylor expanded in t around inf 53.3%
Taylor expanded in z around inf 56.3%
if 1.00000000000000005e-4 < (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)) Initial program 97.3%
associate-+l+97.3%
sub-neg97.3%
sub-neg97.3%
+-commutative97.3%
+-commutative97.3%
+-commutative97.3%
Simplified97.3%
Taylor expanded in x around 0 53.0%
flip--53.0%
div-inv53.0%
add-sqr-sqrt42.7%
+-commutative42.7%
add-sqr-sqrt53.1%
associate--l+53.1%
Applied egg-rr53.1%
associate-*r/53.1%
*-rgt-identity53.1%
associate-+r-53.1%
+-commutative53.1%
associate-+r-53.3%
+-inverses53.3%
metadata-eval53.3%
+-commutative53.3%
Simplified53.3%
Final simplification54.7%
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) (sqrt (+ 1.0 x)))) (/ 1.0 (+ (sqrt y) (sqrt (+ 1.0 y))))) (+ (- (sqrt (+ 1.0 z)) (sqrt z)) (- (sqrt (+ 1.0 t)) (sqrt t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (sqrt(y) + sqrt((1.0 + y))))) + ((sqrt((1.0 + z)) - sqrt(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
code = ((1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))) + (1.0d0 / (sqrt(y) + sqrt((1.0d0 + y))))) + ((sqrt((1.0d0 + z)) - sqrt(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) {
return ((1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))) + (1.0 / (Math.sqrt(y) + Math.sqrt((1.0 + y))))) + ((Math.sqrt((1.0 + z)) - Math.sqrt(z)) + (Math.sqrt((1.0 + t)) - Math.sqrt(t)));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return ((1.0 / (math.sqrt(x) + math.sqrt((1.0 + x)))) + (1.0 / (math.sqrt(y) + math.sqrt((1.0 + y))))) + ((math.sqrt((1.0 + z)) - math.sqrt(z)) + (math.sqrt((1.0 + t)) - math.sqrt(t)))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))) + Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(1.0 + y))))) + Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(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)
tmp = ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (sqrt(y) + sqrt((1.0 + y))))) + ((sqrt((1.0 + z)) - sqrt(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_] := N[(N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{\sqrt{y} + \sqrt{1 + y}}\right) + \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\end{array}
Initial program 92.4%
associate-+l+92.4%
sub-neg92.4%
sub-neg92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
Simplified92.4%
flip--92.3%
div-inv92.3%
add-sqr-sqrt69.8%
add-sqr-sqrt92.6%
associate--l+93.7%
Applied egg-rr93.7%
+-inverses93.7%
metadata-eval93.7%
*-lft-identity93.7%
+-commutative93.7%
Simplified93.7%
flip--93.8%
div-inv93.8%
add-sqr-sqrt76.5%
+-commutative76.5%
add-sqr-sqrt94.0%
+-commutative94.0%
Applied egg-rr94.0%
associate--l+96.1%
+-inverses96.1%
metadata-eval96.1%
*-lft-identity96.1%
+-commutative96.1%
Simplified96.1%
Final simplification96.1%
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 85000.0)
(+
(+ (- (sqrt (+ 1.0 z)) (sqrt z)) (- (sqrt (+ 1.0 t)) (sqrt t)))
(+ (- 1.0 (sqrt x)) (- 1.0 (sqrt y))))
(+
(+
(/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x))))
(/ 1.0 (+ (sqrt y) (sqrt (+ 1.0 y)))))
(* 0.5 (sqrt (/ 1.0 z))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 85000.0) {
tmp = ((sqrt((1.0 + z)) - sqrt(z)) + (sqrt((1.0 + t)) - sqrt(t))) + ((1.0 - sqrt(x)) + (1.0 - sqrt(y)));
} else {
tmp = ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (sqrt(y) + sqrt((1.0 + y))))) + (0.5 * sqrt((1.0 / z)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= 85000.0d0) then
tmp = ((sqrt((1.0d0 + z)) - sqrt(z)) + (sqrt((1.0d0 + t)) - sqrt(t))) + ((1.0d0 - sqrt(x)) + (1.0d0 - sqrt(y)))
else
tmp = ((1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))) + (1.0d0 / (sqrt(y) + sqrt((1.0d0 + y))))) + (0.5d0 * sqrt((1.0d0 / z)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= 85000.0) {
tmp = ((Math.sqrt((1.0 + z)) - Math.sqrt(z)) + (Math.sqrt((1.0 + t)) - Math.sqrt(t))) + ((1.0 - Math.sqrt(x)) + (1.0 - Math.sqrt(y)));
} else {
tmp = ((1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))) + (1.0 / (Math.sqrt(y) + Math.sqrt((1.0 + y))))) + (0.5 * Math.sqrt((1.0 / z)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 85000.0: tmp = ((math.sqrt((1.0 + z)) - math.sqrt(z)) + (math.sqrt((1.0 + t)) - math.sqrt(t))) + ((1.0 - math.sqrt(x)) + (1.0 - math.sqrt(y))) else: tmp = ((1.0 / (math.sqrt(x) + math.sqrt((1.0 + x)))) + (1.0 / (math.sqrt(y) + math.sqrt((1.0 + y))))) + (0.5 * math.sqrt((1.0 / z))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= 85000.0) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(sqrt(Float64(1.0 + t)) - sqrt(t))) + Float64(Float64(1.0 - sqrt(x)) + Float64(1.0 - sqrt(y)))); else tmp = Float64(Float64(Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))) + Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(1.0 + y))))) + Float64(0.5 * sqrt(Float64(1.0 / z)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= 85000.0)
tmp = ((sqrt((1.0 + z)) - sqrt(z)) + (sqrt((1.0 + t)) - sqrt(t))) + ((1.0 - sqrt(x)) + (1.0 - sqrt(y)));
else
tmp = ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (sqrt(y) + sqrt((1.0 + y))))) + (0.5 * sqrt((1.0 / z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, 85000.0], N[(N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(1.0 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 85000:\\
\;\;\;\;\left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) + \left(\left(1 - \sqrt{x}\right) + \left(1 - \sqrt{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{\sqrt{y} + \sqrt{1 + y}}\right) + 0.5 \cdot \sqrt{\frac{1}{z}}\\
\end{array}
\end{array}
if z < 85000Initial program 97.3%
associate-+l+97.3%
sub-neg97.3%
sub-neg97.3%
+-commutative97.3%
+-commutative97.3%
+-commutative97.3%
Simplified97.3%
Taylor expanded in x around 0 53.0%
Taylor expanded in y around 0 26.3%
if 85000 < z Initial program 86.4%
associate-+l+86.4%
sub-neg86.4%
sub-neg86.4%
+-commutative86.4%
+-commutative86.4%
+-commutative86.4%
Simplified86.4%
flip--86.4%
div-inv86.4%
add-sqr-sqrt71.0%
add-sqr-sqrt86.4%
associate--l+88.5%
Applied egg-rr88.5%
+-inverses88.5%
metadata-eval88.5%
*-lft-identity88.5%
+-commutative88.5%
Simplified88.5%
flip--88.6%
div-inv88.6%
add-sqr-sqrt67.8%
+-commutative67.8%
add-sqr-sqrt88.6%
+-commutative88.6%
Applied egg-rr88.6%
associate--l+92.2%
+-inverses92.2%
metadata-eval92.2%
*-lft-identity92.2%
+-commutative92.2%
Simplified92.2%
Taylor expanded in t around inf 53.3%
Taylor expanded in z around inf 56.3%
Final simplification39.8%
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 y))))
(if (<= y 1.95)
(+
(+ (- 1.0 (sqrt x)) (- t_1 (sqrt y)))
(/ 1.0 (+ (sqrt (+ 1.0 z)) (sqrt z))))
(+
(+ (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))) (/ 1.0 (+ (sqrt y) t_1)))
(* 0.5 (sqrt (/ 1.0 z)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + y));
double tmp;
if (y <= 1.95) {
tmp = ((1.0 - sqrt(x)) + (t_1 - sqrt(y))) + (1.0 / (sqrt((1.0 + z)) + sqrt(z)));
} else {
tmp = ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (sqrt(y) + t_1))) + (0.5 * sqrt((1.0 / z)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((1.0d0 + y))
if (y <= 1.95d0) then
tmp = ((1.0d0 - sqrt(x)) + (t_1 - sqrt(y))) + (1.0d0 / (sqrt((1.0d0 + z)) + sqrt(z)))
else
tmp = ((1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))) + (1.0d0 / (sqrt(y) + t_1))) + (0.5d0 * sqrt((1.0d0 / z)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + y));
double tmp;
if (y <= 1.95) {
tmp = ((1.0 - Math.sqrt(x)) + (t_1 - Math.sqrt(y))) + (1.0 / (Math.sqrt((1.0 + z)) + Math.sqrt(z)));
} else {
tmp = ((1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))) + (1.0 / (Math.sqrt(y) + t_1))) + (0.5 * Math.sqrt((1.0 / z)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + y)) tmp = 0 if y <= 1.95: tmp = ((1.0 - math.sqrt(x)) + (t_1 - math.sqrt(y))) + (1.0 / (math.sqrt((1.0 + z)) + math.sqrt(z))) else: tmp = ((1.0 / (math.sqrt(x) + math.sqrt((1.0 + x)))) + (1.0 / (math.sqrt(y) + t_1))) + (0.5 * math.sqrt((1.0 / z))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 + y)) tmp = 0.0 if (y <= 1.95) tmp = Float64(Float64(Float64(1.0 - sqrt(x)) + Float64(t_1 - sqrt(y))) + Float64(1.0 / Float64(sqrt(Float64(1.0 + z)) + sqrt(z)))); else tmp = Float64(Float64(Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))) + Float64(1.0 / Float64(sqrt(y) + t_1))) + Float64(0.5 * sqrt(Float64(1.0 / z)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + y));
tmp = 0.0;
if (y <= 1.95)
tmp = ((1.0 - sqrt(x)) + (t_1 - sqrt(y))) + (1.0 / (sqrt((1.0 + z)) + sqrt(z)));
else
tmp = ((1.0 / (sqrt(x) + sqrt((1.0 + x)))) + (1.0 / (sqrt(y) + t_1))) + (0.5 * sqrt((1.0 / z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 1.95], N[(N[(N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + y}\\
\mathbf{if}\;y \leq 1.95:\\
\;\;\;\;\left(\left(1 - \sqrt{x}\right) + \left(t\_1 - \sqrt{y}\right)\right) + \frac{1}{\sqrt{1 + z} + \sqrt{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sqrt{x} + \sqrt{1 + x}} + \frac{1}{\sqrt{y} + t\_1}\right) + 0.5 \cdot \sqrt{\frac{1}{z}}\\
\end{array}
\end{array}
if y < 1.94999999999999996Initial program 98.4%
associate-+l+98.4%
sub-neg98.4%
sub-neg98.4%
+-commutative98.4%
+-commutative98.4%
+-commutative98.4%
Simplified98.4%
Taylor expanded in x around 0 55.5%
flip--55.5%
div-inv55.5%
add-sqr-sqrt43.4%
add-sqr-sqrt55.5%
associate--l+55.6%
Applied egg-rr55.6%
+-inverses55.6%
metadata-eval55.6%
*-lft-identity55.6%
+-commutative55.6%
Simplified55.6%
Taylor expanded in t around inf 36.1%
if 1.94999999999999996 < y Initial program 86.9%
associate-+l+86.9%
sub-neg86.9%
sub-neg86.9%
+-commutative86.9%
+-commutative86.9%
+-commutative86.9%
Simplified86.9%
flip--86.9%
div-inv86.9%
add-sqr-sqrt43.7%
add-sqr-sqrt87.3%
associate--l+89.5%
Applied egg-rr89.5%
+-inverses89.5%
metadata-eval89.5%
*-lft-identity89.5%
+-commutative89.5%
Simplified89.5%
flip--89.6%
div-inv89.6%
add-sqr-sqrt72.1%
+-commutative72.1%
add-sqr-sqrt89.9%
+-commutative89.9%
Applied egg-rr89.9%
associate--l+93.7%
+-inverses93.7%
metadata-eval93.7%
*-lft-identity93.7%
+-commutative93.7%
Simplified93.7%
Taylor expanded in t around inf 46.0%
Taylor expanded in z around inf 21.8%
Final simplification28.6%
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 (/ 1.0 (+ (sqrt y) (sqrt (+ 1.0 y)))))
(t_2 (- (sqrt (+ 1.0 z)) (sqrt z))))
(if (<= x 0.4)
(+ t_2 (+ t_1 (- 1.0 (sqrt x))))
(+ t_2 (+ t_1 (* 0.5 (sqrt (/ 1.0 x))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (sqrt(y) + sqrt((1.0 + y)));
double t_2 = sqrt((1.0 + z)) - sqrt(z);
double tmp;
if (x <= 0.4) {
tmp = t_2 + (t_1 + (1.0 - sqrt(x)));
} else {
tmp = t_2 + (t_1 + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 1.0d0 / (sqrt(y) + sqrt((1.0d0 + y)))
t_2 = sqrt((1.0d0 + z)) - sqrt(z)
if (x <= 0.4d0) then
tmp = t_2 + (t_1 + (1.0d0 - sqrt(x)))
else
tmp = t_2 + (t_1 + (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 t_1 = 1.0 / (Math.sqrt(y) + Math.sqrt((1.0 + y)));
double t_2 = Math.sqrt((1.0 + z)) - Math.sqrt(z);
double tmp;
if (x <= 0.4) {
tmp = t_2 + (t_1 + (1.0 - Math.sqrt(x)));
} else {
tmp = t_2 + (t_1 + (0.5 * Math.sqrt((1.0 / x))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = 1.0 / (math.sqrt(y) + math.sqrt((1.0 + y))) t_2 = math.sqrt((1.0 + z)) - math.sqrt(z) tmp = 0 if x <= 0.4: tmp = t_2 + (t_1 + (1.0 - math.sqrt(x))) else: tmp = t_2 + (t_1 + (0.5 * math.sqrt((1.0 / x)))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(1.0 + y)))) t_2 = Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) tmp = 0.0 if (x <= 0.4) tmp = Float64(t_2 + Float64(t_1 + Float64(1.0 - sqrt(x)))); else tmp = Float64(t_2 + Float64(t_1 + 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)
t_1 = 1.0 / (sqrt(y) + sqrt((1.0 + y)));
t_2 = sqrt((1.0 + z)) - sqrt(z);
tmp = 0.0;
if (x <= 0.4)
tmp = t_2 + (t_1 + (1.0 - sqrt(x)));
else
tmp = t_2 + (t_1 + (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_] := Block[{t$95$1 = N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 0.4], N[(t$95$2 + N[(t$95$1 + N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(t$95$1 + N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{\sqrt{y} + \sqrt{1 + y}}\\
t_2 := \sqrt{1 + z} - \sqrt{z}\\
\mathbf{if}\;x \leq 0.4:\\
\;\;\;\;t\_2 + \left(t\_1 + \left(1 - \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 + \left(t\_1 + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\\
\end{array}
\end{array}
if x < 0.40000000000000002Initial program 98.6%
associate-+l+98.6%
sub-neg98.6%
sub-neg98.6%
+-commutative98.6%
+-commutative98.6%
+-commutative98.6%
Simplified98.6%
flip--98.6%
div-inv98.6%
add-sqr-sqrt75.3%
add-sqr-sqrt98.8%
associate--l+99.1%
Applied egg-rr99.1%
+-inverses99.1%
metadata-eval99.1%
*-lft-identity99.1%
+-commutative99.1%
Simplified99.1%
Taylor expanded in t around inf 59.8%
Taylor expanded in x around 0 59.5%
if 0.40000000000000002 < x Initial program 86.1%
associate-+l+86.1%
sub-neg86.1%
sub-neg86.1%
+-commutative86.1%
+-commutative86.1%
+-commutative86.1%
Simplified86.1%
flip--86.1%
div-inv86.1%
add-sqr-sqrt64.2%
add-sqr-sqrt86.3%
associate--l+88.4%
Applied egg-rr88.4%
+-inverses88.4%
metadata-eval88.4%
*-lft-identity88.4%
+-commutative88.4%
Simplified88.4%
Taylor expanded in t around inf 47.0%
Taylor expanded in x around inf 49.6%
Final simplification54.5%
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)) (- (sqrt (+ 1.0 y)) (sqrt y))) (/ 1.0 (+ (sqrt (+ 1.0 z)) (sqrt z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return ((1.0 - sqrt(x)) + (sqrt((1.0 + y)) - sqrt(y))) + (1.0 / (sqrt((1.0 + z)) + sqrt(z)));
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((1.0d0 - sqrt(x)) + (sqrt((1.0d0 + y)) - sqrt(y))) + (1.0d0 / (sqrt((1.0d0 + z)) + sqrt(z)))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return ((1.0 - Math.sqrt(x)) + (Math.sqrt((1.0 + y)) - Math.sqrt(y))) + (1.0 / (Math.sqrt((1.0 + z)) + Math.sqrt(z)));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return ((1.0 - math.sqrt(x)) + (math.sqrt((1.0 + y)) - math.sqrt(y))) + (1.0 / (math.sqrt((1.0 + z)) + math.sqrt(z)))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(Float64(1.0 - sqrt(x)) + Float64(sqrt(Float64(1.0 + y)) - sqrt(y))) + Float64(1.0 / Float64(sqrt(Float64(1.0 + z)) + sqrt(z)))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = ((1.0 - sqrt(x)) + (sqrt((1.0 + y)) - sqrt(y))) + (1.0 / (sqrt((1.0 + z)) + sqrt(z)));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\left(\left(1 - \sqrt{x}\right) + \left(\sqrt{1 + y} - \sqrt{y}\right)\right) + \frac{1}{\sqrt{1 + z} + \sqrt{z}}
\end{array}
Initial program 92.4%
associate-+l+92.4%
sub-neg92.4%
sub-neg92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
Simplified92.4%
Taylor expanded in x around 0 49.2%
flip--49.2%
div-inv49.2%
add-sqr-sqrt40.4%
add-sqr-sqrt49.2%
associate--l+49.3%
Applied egg-rr49.3%
+-inverses49.3%
metadata-eval49.3%
*-lft-identity49.3%
+-commutative49.3%
Simplified49.3%
Taylor expanded in t around inf 30.3%
Final simplification30.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (+ (- (sqrt (+ 1.0 z)) (sqrt z)) (+ (/ 1.0 (+ (sqrt y) (sqrt (+ 1.0 y)))) (- 1.0 (sqrt x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (sqrt((1.0 + z)) - sqrt(z)) + ((1.0 / (sqrt(y) + sqrt((1.0 + y)))) + (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 = (sqrt((1.0d0 + z)) - sqrt(z)) + ((1.0d0 / (sqrt(y) + sqrt((1.0d0 + y)))) + (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 (Math.sqrt((1.0 + z)) - Math.sqrt(z)) + ((1.0 / (Math.sqrt(y) + Math.sqrt((1.0 + y)))) + (1.0 - Math.sqrt(x)));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (math.sqrt((1.0 + z)) - math.sqrt(z)) + ((1.0 / (math.sqrt(y) + math.sqrt((1.0 + y)))) + (1.0 - math.sqrt(x)))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(1.0 + y)))) + Float64(1.0 - sqrt(x)))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (sqrt((1.0 + z)) - sqrt(z)) + ((1.0 / (sqrt(y) + sqrt((1.0 + y)))) + (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[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\frac{1}{\sqrt{y} + \sqrt{1 + y}} + \left(1 - \sqrt{x}\right)\right)
\end{array}
Initial program 92.4%
associate-+l+92.4%
sub-neg92.4%
sub-neg92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
Simplified92.4%
flip--92.3%
div-inv92.3%
add-sqr-sqrt69.8%
add-sqr-sqrt92.6%
associate--l+93.7%
Applied egg-rr93.7%
+-inverses93.7%
metadata-eval93.7%
*-lft-identity93.7%
+-commutative93.7%
Simplified93.7%
Taylor expanded in t around inf 53.4%
Taylor expanded in x around 0 30.4%
Final simplification30.4%
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 34000000.0)
(-
(+ 1.0 (+ (sqrt (+ 1.0 z)) (/ 1.0 (+ 1.0 (sqrt y)))))
(+ (sqrt x) (sqrt z)))
(+
(* 0.5 (sqrt (/ 1.0 z)))
(+ (/ 1.0 (+ (sqrt y) (sqrt (+ 1.0 y)))) (- 1.0 (sqrt x))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 34000000.0) {
tmp = (1.0 + (sqrt((1.0 + z)) + (1.0 / (1.0 + sqrt(y))))) - (sqrt(x) + sqrt(z));
} else {
tmp = (0.5 * sqrt((1.0 / z))) + ((1.0 / (sqrt(y) + sqrt((1.0 + y)))) + (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) :: tmp
if (z <= 34000000.0d0) then
tmp = (1.0d0 + (sqrt((1.0d0 + z)) + (1.0d0 / (1.0d0 + sqrt(y))))) - (sqrt(x) + sqrt(z))
else
tmp = (0.5d0 * sqrt((1.0d0 / z))) + ((1.0d0 / (sqrt(y) + sqrt((1.0d0 + y)))) + (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 tmp;
if (z <= 34000000.0) {
tmp = (1.0 + (Math.sqrt((1.0 + z)) + (1.0 / (1.0 + Math.sqrt(y))))) - (Math.sqrt(x) + Math.sqrt(z));
} else {
tmp = (0.5 * Math.sqrt((1.0 / z))) + ((1.0 / (Math.sqrt(y) + Math.sqrt((1.0 + y)))) + (1.0 - Math.sqrt(x)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 34000000.0: tmp = (1.0 + (math.sqrt((1.0 + z)) + (1.0 / (1.0 + math.sqrt(y))))) - (math.sqrt(x) + math.sqrt(z)) else: tmp = (0.5 * math.sqrt((1.0 / z))) + ((1.0 / (math.sqrt(y) + math.sqrt((1.0 + y)))) + (1.0 - 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 <= 34000000.0) tmp = Float64(Float64(1.0 + Float64(sqrt(Float64(1.0 + z)) + Float64(1.0 / Float64(1.0 + sqrt(y))))) - Float64(sqrt(x) + sqrt(z))); else tmp = Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + Float64(Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(1.0 + y)))) + 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)
tmp = 0.0;
if (z <= 34000000.0)
tmp = (1.0 + (sqrt((1.0 + z)) + (1.0 / (1.0 + sqrt(y))))) - (sqrt(x) + sqrt(z));
else
tmp = (0.5 * sqrt((1.0 / z))) + ((1.0 / (sqrt(y) + sqrt((1.0 + y)))) + (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_] := If[LessEqual[z, 34000000.0], N[(N[(1.0 + N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[(1.0 + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 - 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 34000000:\\
\;\;\;\;\left(1 + \left(\sqrt{1 + z} + \frac{1}{1 + \sqrt{y}}\right)\right) - \left(\sqrt{x} + \sqrt{z}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{z}} + \left(\frac{1}{\sqrt{y} + \sqrt{1 + y}} + \left(1 - \sqrt{x}\right)\right)\\
\end{array}
\end{array}
if z < 3.4e7Initial program 97.3%
associate-+l+97.3%
sub-neg97.3%
sub-neg97.3%
+-commutative97.3%
+-commutative97.3%
+-commutative97.3%
Simplified97.3%
flip--97.2%
div-inv97.2%
add-sqr-sqrt68.7%
add-sqr-sqrt97.6%
associate--l+98.0%
Applied egg-rr98.0%
+-inverses98.0%
metadata-eval98.0%
*-lft-identity98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in t around inf 56.3%
Taylor expanded in x around 0 32.4%
Taylor expanded in y around 0 31.6%
if 3.4e7 < z Initial program 86.4%
associate-+l+86.4%
sub-neg86.4%
sub-neg86.4%
+-commutative86.4%
+-commutative86.4%
+-commutative86.4%
Simplified86.4%
flip--86.4%
div-inv86.4%
add-sqr-sqrt71.0%
add-sqr-sqrt86.4%
associate--l+88.5%
Applied egg-rr88.5%
+-inverses88.5%
metadata-eval88.5%
*-lft-identity88.5%
+-commutative88.5%
Simplified88.5%
Taylor expanded in t around inf 49.9%
Taylor expanded in x around 0 28.0%
Taylor expanded in z around inf 28.2%
Final simplification30.1%
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 1.02e+26)
(+
1.0
(+ (sqrt (+ 1.0 z)) (- (/ 1.0 (+ 1.0 (sqrt y))) (+ (sqrt x) (sqrt z)))))
(+ 1.0 (- (/ 1.0 (+ (sqrt y) (sqrt (+ 1.0 y)))) (sqrt x)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 1.02e+26) {
tmp = 1.0 + (sqrt((1.0 + z)) + ((1.0 / (1.0 + sqrt(y))) - (sqrt(x) + sqrt(z))));
} else {
tmp = 1.0 + ((1.0 / (sqrt(y) + sqrt((1.0 + 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 <= 1.02d+26) then
tmp = 1.0d0 + (sqrt((1.0d0 + z)) + ((1.0d0 / (1.0d0 + sqrt(y))) - (sqrt(x) + sqrt(z))))
else
tmp = 1.0d0 + ((1.0d0 / (sqrt(y) + sqrt((1.0d0 + 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 <= 1.02e+26) {
tmp = 1.0 + (Math.sqrt((1.0 + z)) + ((1.0 / (1.0 + Math.sqrt(y))) - (Math.sqrt(x) + Math.sqrt(z))));
} else {
tmp = 1.0 + ((1.0 / (Math.sqrt(y) + Math.sqrt((1.0 + 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 <= 1.02e+26: tmp = 1.0 + (math.sqrt((1.0 + z)) + ((1.0 / (1.0 + math.sqrt(y))) - (math.sqrt(x) + math.sqrt(z)))) else: tmp = 1.0 + ((1.0 / (math.sqrt(y) + math.sqrt((1.0 + 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 <= 1.02e+26) tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 + z)) + Float64(Float64(1.0 / Float64(1.0 + sqrt(y))) - Float64(sqrt(x) + sqrt(z))))); else tmp = Float64(1.0 + Float64(Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(1.0 + 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 <= 1.02e+26)
tmp = 1.0 + (sqrt((1.0 + z)) + ((1.0 / (1.0 + sqrt(y))) - (sqrt(x) + sqrt(z))));
else
tmp = 1.0 + ((1.0 / (sqrt(y) + sqrt((1.0 + 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, 1.02e+26], N[(1.0 + N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[(N[(1.0 / N[(1.0 + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.02 \cdot 10^{+26}:\\
\;\;\;\;1 + \left(\sqrt{1 + z} + \left(\frac{1}{1 + \sqrt{y}} - \left(\sqrt{x} + \sqrt{z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{1}{\sqrt{y} + \sqrt{1 + y}} - \sqrt{x}\right)\\
\end{array}
\end{array}
if z < 1.0200000000000001e26Initial program 96.7%
associate-+l+96.7%
sub-neg96.7%
sub-neg96.7%
+-commutative96.7%
+-commutative96.7%
+-commutative96.7%
Simplified96.7%
flip--96.7%
div-inv96.7%
add-sqr-sqrt68.3%
add-sqr-sqrt97.1%
associate--l+97.5%
Applied egg-rr97.5%
+-inverses97.5%
metadata-eval97.5%
*-lft-identity97.5%
+-commutative97.5%
Simplified97.5%
Taylor expanded in t around inf 55.7%
Taylor expanded in x around 0 31.7%
Taylor expanded in y around 0 31.0%
associate--l+31.0%
associate--l+31.0%
Simplified31.0%
if 1.0200000000000001e26 < z Initial program 86.8%
associate-+l+86.8%
sub-neg86.8%
sub-neg86.8%
+-commutative86.8%
+-commutative86.8%
+-commutative86.8%
Simplified86.8%
flip--86.8%
div-inv86.8%
add-sqr-sqrt71.6%
add-sqr-sqrt86.8%
associate--l+88.9%
Applied egg-rr88.9%
+-inverses88.9%
metadata-eval88.9%
*-lft-identity88.9%
+-commutative88.9%
Simplified88.9%
Taylor expanded in t around inf 50.4%
Taylor expanded in x around 0 28.7%
Taylor expanded in z around inf 28.7%
associate--l+28.7%
Simplified28.7%
Final simplification30.0%
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 1.3e-18)
(+
(- (sqrt (+ 1.0 z)) (sqrt z))
(+ (- 1.0 (sqrt x)) (/ 1.0 (+ 1.0 (sqrt y)))))
(+ 1.0 (- (/ 1.0 (+ (sqrt y) (sqrt (+ 1.0 y)))) (sqrt x)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.3e-18) {
tmp = (sqrt((1.0 + z)) - sqrt(z)) + ((1.0 - sqrt(x)) + (1.0 / (1.0 + sqrt(y))));
} else {
tmp = 1.0 + ((1.0 / (sqrt(y) + sqrt((1.0 + 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 (y <= 1.3d-18) then
tmp = (sqrt((1.0d0 + z)) - sqrt(z)) + ((1.0d0 - sqrt(x)) + (1.0d0 / (1.0d0 + sqrt(y))))
else
tmp = 1.0d0 + ((1.0d0 / (sqrt(y) + sqrt((1.0d0 + 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 (y <= 1.3e-18) {
tmp = (Math.sqrt((1.0 + z)) - Math.sqrt(z)) + ((1.0 - Math.sqrt(x)) + (1.0 / (1.0 + Math.sqrt(y))));
} else {
tmp = 1.0 + ((1.0 / (Math.sqrt(y) + Math.sqrt((1.0 + y)))) - Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 1.3e-18: tmp = (math.sqrt((1.0 + z)) - math.sqrt(z)) + ((1.0 - math.sqrt(x)) + (1.0 / (1.0 + math.sqrt(y)))) else: tmp = 1.0 + ((1.0 / (math.sqrt(y) + math.sqrt((1.0 + 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 (y <= 1.3e-18) tmp = Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(Float64(1.0 - sqrt(x)) + Float64(1.0 / Float64(1.0 + sqrt(y))))); else tmp = Float64(1.0 + Float64(Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(1.0 + 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 (y <= 1.3e-18)
tmp = (sqrt((1.0 + z)) - sqrt(z)) + ((1.0 - sqrt(x)) + (1.0 / (1.0 + sqrt(y))));
else
tmp = 1.0 + ((1.0 / (sqrt(y) + sqrt((1.0 + 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[y, 1.3e-18], 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[(1.0 + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.3 \cdot 10^{-18}:\\
\;\;\;\;\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(1 - \sqrt{x}\right) + \frac{1}{1 + \sqrt{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{1}{\sqrt{y} + \sqrt{1 + y}} - \sqrt{x}\right)\\
\end{array}
\end{array}
if y < 1.3e-18Initial program 98.3%
associate-+l+98.3%
sub-neg98.3%
sub-neg98.3%
+-commutative98.3%
+-commutative98.3%
+-commutative98.3%
Simplified98.3%
flip--98.3%
div-inv98.3%
add-sqr-sqrt98.3%
add-sqr-sqrt98.3%
associate--l+98.3%
Applied egg-rr98.3%
+-inverses98.3%
metadata-eval98.3%
*-lft-identity98.3%
+-commutative98.3%
Simplified98.3%
Taylor expanded in t around inf 65.7%
Taylor expanded in x around 0 36.3%
Taylor expanded in y around 0 36.3%
if 1.3e-18 < y Initial program 87.3%
associate-+l+87.3%
sub-neg87.3%
sub-neg87.3%
+-commutative87.3%
+-commutative87.3%
+-commutative87.3%
Simplified87.3%
flip--87.2%
div-inv87.2%
add-sqr-sqrt45.3%
add-sqr-sqrt87.6%
associate--l+89.8%
Applied egg-rr89.8%
+-inverses89.8%
metadata-eval89.8%
*-lft-identity89.8%
+-commutative89.8%
Simplified89.8%
Taylor expanded in t around inf 42.9%
Taylor expanded in x around 0 25.3%
Taylor expanded in z around inf 15.1%
associate--l+15.1%
Simplified15.1%
Final simplification24.9%
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 2e+15)
(-
(+ 1.0 (+ (sqrt (+ 1.0 z)) (/ 1.0 (+ 1.0 (sqrt y)))))
(+ (sqrt x) (sqrt z)))
(+ 1.0 (- (/ 1.0 (+ (sqrt y) (sqrt (+ 1.0 y)))) (sqrt x)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 2e+15) {
tmp = (1.0 + (sqrt((1.0 + z)) + (1.0 / (1.0 + sqrt(y))))) - (sqrt(x) + sqrt(z));
} else {
tmp = 1.0 + ((1.0 / (sqrt(y) + sqrt((1.0 + 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 <= 2d+15) then
tmp = (1.0d0 + (sqrt((1.0d0 + z)) + (1.0d0 / (1.0d0 + sqrt(y))))) - (sqrt(x) + sqrt(z))
else
tmp = 1.0d0 + ((1.0d0 / (sqrt(y) + sqrt((1.0d0 + 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 <= 2e+15) {
tmp = (1.0 + (Math.sqrt((1.0 + z)) + (1.0 / (1.0 + Math.sqrt(y))))) - (Math.sqrt(x) + Math.sqrt(z));
} else {
tmp = 1.0 + ((1.0 / (Math.sqrt(y) + Math.sqrt((1.0 + 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 <= 2e+15: tmp = (1.0 + (math.sqrt((1.0 + z)) + (1.0 / (1.0 + math.sqrt(y))))) - (math.sqrt(x) + math.sqrt(z)) else: tmp = 1.0 + ((1.0 / (math.sqrt(y) + math.sqrt((1.0 + 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 <= 2e+15) tmp = Float64(Float64(1.0 + Float64(sqrt(Float64(1.0 + z)) + Float64(1.0 / Float64(1.0 + sqrt(y))))) - Float64(sqrt(x) + sqrt(z))); else tmp = Float64(1.0 + Float64(Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(1.0 + 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 <= 2e+15)
tmp = (1.0 + (sqrt((1.0 + z)) + (1.0 / (1.0 + sqrt(y))))) - (sqrt(x) + sqrt(z));
else
tmp = 1.0 + ((1.0 / (sqrt(y) + sqrt((1.0 + 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, 2e+15], N[(N[(1.0 + N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[(1.0 + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2 \cdot 10^{+15}:\\
\;\;\;\;\left(1 + \left(\sqrt{1 + z} + \frac{1}{1 + \sqrt{y}}\right)\right) - \left(\sqrt{x} + \sqrt{z}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{1}{\sqrt{y} + \sqrt{1 + y}} - \sqrt{x}\right)\\
\end{array}
\end{array}
if z < 2e15Initial program 97.1%
associate-+l+97.1%
sub-neg97.1%
sub-neg97.1%
+-commutative97.1%
+-commutative97.1%
+-commutative97.1%
Simplified97.1%
flip--97.0%
div-inv97.0%
add-sqr-sqrt68.7%
add-sqr-sqrt97.4%
associate--l+97.8%
Applied egg-rr97.8%
+-inverses97.8%
metadata-eval97.8%
*-lft-identity97.8%
+-commutative97.8%
Simplified97.8%
Taylor expanded in t around inf 56.0%
Taylor expanded in x around 0 32.1%
Taylor expanded in y around 0 31.4%
if 2e15 < z Initial program 86.5%
associate-+l+86.5%
sub-neg86.5%
sub-neg86.5%
+-commutative86.5%
+-commutative86.5%
+-commutative86.5%
Simplified86.5%
flip--86.5%
div-inv86.5%
add-sqr-sqrt71.0%
add-sqr-sqrt86.5%
associate--l+88.6%
Applied egg-rr88.6%
+-inverses88.6%
metadata-eval88.6%
*-lft-identity88.6%
+-commutative88.6%
Simplified88.6%
Taylor expanded in t around inf 50.2%
Taylor expanded in x around 0 28.2%
Taylor expanded in z around inf 28.2%
associate--l+28.2%
Simplified28.2%
Final simplification30.0%
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 (/ 1.0 (+ (sqrt y) (sqrt (+ 1.0 y))))))
(if (<= z 1.0)
(- (+ t_1 2.0) (+ (sqrt x) (sqrt z)))
(+ 1.0 (- t_1 (sqrt x))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (sqrt(y) + sqrt((1.0 + y)));
double tmp;
if (z <= 1.0) {
tmp = (t_1 + 2.0) - (sqrt(x) + sqrt(z));
} else {
tmp = 1.0 + (t_1 - 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 = 1.0d0 / (sqrt(y) + sqrt((1.0d0 + y)))
if (z <= 1.0d0) then
tmp = (t_1 + 2.0d0) - (sqrt(x) + sqrt(z))
else
tmp = 1.0d0 + (t_1 - 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 = 1.0 / (Math.sqrt(y) + Math.sqrt((1.0 + y)));
double tmp;
if (z <= 1.0) {
tmp = (t_1 + 2.0) - (Math.sqrt(x) + Math.sqrt(z));
} else {
tmp = 1.0 + (t_1 - Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = 1.0 / (math.sqrt(y) + math.sqrt((1.0 + y))) tmp = 0 if z <= 1.0: tmp = (t_1 + 2.0) - (math.sqrt(x) + math.sqrt(z)) else: tmp = 1.0 + (t_1 - math.sqrt(x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(1.0 + y)))) tmp = 0.0 if (z <= 1.0) tmp = Float64(Float64(t_1 + 2.0) - Float64(sqrt(x) + sqrt(z))); else tmp = Float64(1.0 + Float64(t_1 - 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 = 1.0 / (sqrt(y) + sqrt((1.0 + y)));
tmp = 0.0;
if (z <= 1.0)
tmp = (t_1 + 2.0) - (sqrt(x) + sqrt(z));
else
tmp = 1.0 + (t_1 - 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[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.0], N[(N[(t$95$1 + 2.0), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(t$95$1 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{\sqrt{y} + \sqrt{1 + y}}\\
\mathbf{if}\;z \leq 1:\\
\;\;\;\;\left(t\_1 + 2\right) - \left(\sqrt{x} + \sqrt{z}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(t\_1 - \sqrt{x}\right)\\
\end{array}
\end{array}
if z < 1Initial program 97.3%
associate-+l+97.3%
sub-neg97.3%
sub-neg97.3%
+-commutative97.3%
+-commutative97.3%
+-commutative97.3%
Simplified97.3%
flip--97.2%
div-inv97.2%
add-sqr-sqrt69.2%
add-sqr-sqrt97.6%
associate--l+98.0%
Applied egg-rr98.0%
+-inverses98.0%
metadata-eval98.0%
*-lft-identity98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in t around inf 56.6%
Taylor expanded in x around 0 32.6%
Taylor expanded in z around 0 31.0%
if 1 < z Initial program 86.5%
associate-+l+86.5%
sub-neg86.5%
sub-neg86.5%
+-commutative86.5%
+-commutative86.5%
+-commutative86.5%
Simplified86.5%
flip--86.5%
div-inv86.5%
add-sqr-sqrt70.4%
add-sqr-sqrt86.5%
associate--l+88.6%
Applied egg-rr88.6%
+-inverses88.6%
metadata-eval88.6%
*-lft-identity88.6%
+-commutative88.6%
Simplified88.6%
Taylor expanded in t around inf 49.6%
Taylor expanded in x around 0 27.8%
Taylor expanded in z around inf 27.8%
associate--l+27.8%
Simplified27.8%
Final simplification29.5%
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 (- (/ 1.0 (+ (sqrt y) (sqrt (+ 1.0 y)))) (sqrt x))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 + ((1.0 / (sqrt(y) + sqrt((1.0 + y)))) - 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 + ((1.0d0 / (sqrt(y) + sqrt((1.0d0 + y)))) - 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 + ((1.0 / (Math.sqrt(y) + Math.sqrt((1.0 + y)))) - Math.sqrt(x));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 + ((1.0 / (math.sqrt(y) + math.sqrt((1.0 + y)))) - math.sqrt(x))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 + Float64(Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(1.0 + y)))) - sqrt(x))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 + ((1.0 / (sqrt(y) + sqrt((1.0 + y)))) - 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[(N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 + \left(\frac{1}{\sqrt{y} + \sqrt{1 + y}} - \sqrt{x}\right)
\end{array}
Initial program 92.4%
associate-+l+92.4%
sub-neg92.4%
sub-neg92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
Simplified92.4%
flip--92.3%
div-inv92.3%
add-sqr-sqrt69.8%
add-sqr-sqrt92.6%
associate--l+93.7%
Applied egg-rr93.7%
+-inverses93.7%
metadata-eval93.7%
*-lft-identity93.7%
+-commutative93.7%
Simplified93.7%
Taylor expanded in t around inf 53.4%
Taylor expanded in x around 0 30.4%
Taylor expanded in z around inf 18.5%
associate--l+18.5%
Simplified18.5%
Final simplification18.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (+ (sqrt (+ 1.0 z)) (- 1.0 (+ (sqrt x) (sqrt z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return sqrt((1.0 + z)) + (1.0 - (sqrt(x) + sqrt(z)));
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = sqrt((1.0d0 + z)) + (1.0d0 - (sqrt(x) + sqrt(z)))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return Math.sqrt((1.0 + z)) + (1.0 - (Math.sqrt(x) + Math.sqrt(z)));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return math.sqrt((1.0 + z)) + (1.0 - (math.sqrt(x) + math.sqrt(z)))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(sqrt(Float64(1.0 + z)) + Float64(1.0 - Float64(sqrt(x) + sqrt(z)))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = sqrt((1.0 + z)) + (1.0 - (sqrt(x) + sqrt(z)));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[(1.0 - N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\sqrt{1 + z} + \left(1 - \left(\sqrt{x} + \sqrt{z}\right)\right)
\end{array}
Initial program 92.4%
associate-+l+92.4%
sub-neg92.4%
sub-neg92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
Simplified92.4%
flip--92.3%
div-inv92.3%
add-sqr-sqrt69.8%
add-sqr-sqrt92.6%
associate--l+93.7%
Applied egg-rr93.7%
+-inverses93.7%
metadata-eval93.7%
*-lft-identity93.7%
+-commutative93.7%
Simplified93.7%
Taylor expanded in t around inf 53.4%
Taylor expanded in x around 0 30.4%
Taylor expanded in y around inf 12.4%
+-commutative12.4%
associate--l+12.4%
Simplified12.4%
Final simplification12.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (* z (+ 0.5 (pow z -0.5))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return z * (0.5 + pow(z, -0.5));
}
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 = z * (0.5d0 + (z ** (-0.5d0)))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return z * (0.5 + Math.pow(z, -0.5));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return z * (0.5 + math.pow(z, -0.5))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(z * Float64(0.5 + (z ^ -0.5))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = z * (0.5 + (z ^ -0.5));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(z * N[(0.5 + N[Power[z, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
z \cdot \left(0.5 + {z}^{-0.5}\right)
\end{array}
Initial program 92.4%
associate-+l+92.4%
sub-neg92.4%
sub-neg92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
Simplified92.4%
Taylor expanded in z around 0 54.9%
Taylor expanded in z around inf 3.3%
Taylor expanded in z around -inf 0.0%
cancel-sign-sub-inv0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt6.1%
*-commutative6.1%
neg-mul-16.1%
remove-double-neg6.1%
rem-exp-log6.1%
exp-neg6.1%
unpow1/26.1%
exp-prod6.1%
distribute-lft-neg-out6.1%
distribute-rgt-neg-in6.1%
metadata-eval6.1%
exp-to-pow6.1%
Simplified6.1%
Final simplification6.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (- (* z 0.5) (sqrt z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (z * 0.5) - sqrt(z);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (z * 0.5d0) - sqrt(z)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (z * 0.5) - Math.sqrt(z);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (z * 0.5) - math.sqrt(z)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(z * 0.5) - sqrt(z)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (z * 0.5) - sqrt(z);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(z * 0.5), $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
z \cdot 0.5 - \sqrt{z}
\end{array}
Initial program 92.4%
associate-+l+92.4%
sub-neg92.4%
sub-neg92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
Simplified92.4%
Taylor expanded in z around 0 54.9%
Taylor expanded in z around inf 3.3%
Taylor expanded in z around 0 3.3%
neg-mul-13.3%
+-commutative3.3%
unsub-neg3.3%
*-commutative3.3%
Simplified3.3%
Final simplification3.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (- (sqrt x)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return -sqrt(x);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -sqrt(x)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return -Math.sqrt(x);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return -math.sqrt(x)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(-sqrt(x)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = -sqrt(x);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := (-N[Sqrt[x], $MachinePrecision])
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
-\sqrt{x}
\end{array}
Initial program 92.4%
associate-+l+92.4%
sub-neg92.4%
sub-neg92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
Simplified92.4%
flip--92.3%
div-inv92.3%
add-sqr-sqrt69.8%
add-sqr-sqrt92.6%
associate--l+93.7%
Applied egg-rr93.7%
+-inverses93.7%
metadata-eval93.7%
*-lft-identity93.7%
+-commutative93.7%
Simplified93.7%
Taylor expanded in t around inf 53.4%
Taylor expanded in x around 0 30.4%
Taylor expanded in x around inf 1.6%
mul-1-neg1.6%
Simplified1.6%
Final simplification1.6%
(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}
herbie shell --seed 2024077
(FPCore (x y z t)
:name "Main:z from "
:precision binary64
:alt
(+ (+ (+ (/ 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))))