
(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 19 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 (+ x 1.0)))
(t_2 (sqrt (+ 1.0 z)))
(t_3 (- (sqrt (+ 1.0 t)) (sqrt t)))
(t_4 (/ 1.0 (+ (sqrt (+ 1.0 y)) (sqrt y)))))
(if (<= (- t_1 (sqrt x)) 0.4)
(+ (+ t_4 (/ 1.0 (+ (sqrt x) t_1))) (+ (- t_2 (sqrt z)) t_3))
(+
(+ t_1 (- t_4 (sqrt x)))
(+ t_3 (/ (+ 1.0 (- z z)) (+ t_2 (sqrt z))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0));
double t_2 = sqrt((1.0 + z));
double t_3 = sqrt((1.0 + t)) - sqrt(t);
double t_4 = 1.0 / (sqrt((1.0 + y)) + sqrt(y));
double tmp;
if ((t_1 - sqrt(x)) <= 0.4) {
tmp = (t_4 + (1.0 / (sqrt(x) + t_1))) + ((t_2 - sqrt(z)) + t_3);
} else {
tmp = (t_1 + (t_4 - sqrt(x))) + (t_3 + ((1.0 + (z - z)) / (t_2 + sqrt(z))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = sqrt((x + 1.0d0))
t_2 = sqrt((1.0d0 + z))
t_3 = sqrt((1.0d0 + t)) - sqrt(t)
t_4 = 1.0d0 / (sqrt((1.0d0 + y)) + sqrt(y))
if ((t_1 - sqrt(x)) <= 0.4d0) then
tmp = (t_4 + (1.0d0 / (sqrt(x) + t_1))) + ((t_2 - sqrt(z)) + t_3)
else
tmp = (t_1 + (t_4 - sqrt(x))) + (t_3 + ((1.0d0 + (z - z)) / (t_2 + sqrt(z))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0));
double t_2 = Math.sqrt((1.0 + z));
double t_3 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double t_4 = 1.0 / (Math.sqrt((1.0 + y)) + Math.sqrt(y));
double tmp;
if ((t_1 - Math.sqrt(x)) <= 0.4) {
tmp = (t_4 + (1.0 / (Math.sqrt(x) + t_1))) + ((t_2 - Math.sqrt(z)) + t_3);
} else {
tmp = (t_1 + (t_4 - Math.sqrt(x))) + (t_3 + ((1.0 + (z - z)) / (t_2 + Math.sqrt(z))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) t_2 = math.sqrt((1.0 + z)) t_3 = math.sqrt((1.0 + t)) - math.sqrt(t) t_4 = 1.0 / (math.sqrt((1.0 + y)) + math.sqrt(y)) tmp = 0 if (t_1 - math.sqrt(x)) <= 0.4: tmp = (t_4 + (1.0 / (math.sqrt(x) + t_1))) + ((t_2 - math.sqrt(z)) + t_3) else: tmp = (t_1 + (t_4 - math.sqrt(x))) + (t_3 + ((1.0 + (z - z)) / (t_2 + math.sqrt(z)))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(x + 1.0)) t_2 = sqrt(Float64(1.0 + z)) t_3 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) t_4 = Float64(1.0 / Float64(sqrt(Float64(1.0 + y)) + sqrt(y))) tmp = 0.0 if (Float64(t_1 - sqrt(x)) <= 0.4) tmp = Float64(Float64(t_4 + Float64(1.0 / Float64(sqrt(x) + t_1))) + Float64(Float64(t_2 - sqrt(z)) + t_3)); else tmp = Float64(Float64(t_1 + Float64(t_4 - sqrt(x))) + Float64(t_3 + Float64(Float64(1.0 + Float64(z - z)) / Float64(t_2 + sqrt(z))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((x + 1.0));
t_2 = sqrt((1.0 + z));
t_3 = sqrt((1.0 + t)) - sqrt(t);
t_4 = 1.0 / (sqrt((1.0 + y)) + sqrt(y));
tmp = 0.0;
if ((t_1 - sqrt(x)) <= 0.4)
tmp = (t_4 + (1.0 / (sqrt(x) + t_1))) + ((t_2 - sqrt(z)) + t_3);
else
tmp = (t_1 + (t_4 - sqrt(x))) + (t_3 + ((1.0 + (z - z)) / (t_2 + sqrt(z))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 / N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], 0.4], N[(N[(t$95$4 + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(t$95$4 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 + N[(N[(1.0 + N[(z - z), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1}\\
t_2 := \sqrt{1 + z}\\
t_3 := \sqrt{1 + t} - \sqrt{t}\\
t_4 := \frac{1}{\sqrt{1 + y} + \sqrt{y}}\\
\mathbf{if}\;t_1 - \sqrt{x} \leq 0.4:\\
\;\;\;\;\left(t_4 + \frac{1}{\sqrt{x} + t_1}\right) + \left(\left(t_2 - \sqrt{z}\right) + t_3\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t_1 + \left(t_4 - \sqrt{x}\right)\right) + \left(t_3 + \frac{1 + \left(z - z\right)}{t_2 + \sqrt{z}}\right)\\
\end{array}
\end{array}
if (-.f64 (sqrt.f64 (+.f64 x 1)) (sqrt.f64 x)) < 0.40000000000000002Initial program 86.2%
associate-+l+86.2%
associate-+l-51.2%
+-commutative51.2%
sub-neg51.2%
sub-neg51.2%
+-commutative51.2%
+-commutative51.2%
Simplified51.2%
flip--51.2%
add-sqr-sqrt43.0%
add-sqr-sqrt51.2%
Applied egg-rr51.2%
associate--l+51.2%
+-inverses51.2%
metadata-eval51.2%
Simplified51.2%
add-exp-log51.2%
associate--r-89.1%
Applied egg-rr89.1%
flip--89.6%
add-sqr-sqrt54.8%
+-commutative54.8%
add-sqr-sqrt89.9%
+-commutative89.9%
Applied egg-rr89.9%
associate--l+92.7%
+-inverses92.7%
metadata-eval92.7%
Simplified92.7%
add-exp-log92.9%
Applied egg-rr92.9%
+-commutative92.9%
Simplified92.9%
if 0.40000000000000002 < (-.f64 (sqrt.f64 (+.f64 x 1)) (sqrt.f64 x)) Initial program 97.2%
associate-+l+97.2%
associate-+l-97.2%
+-commutative97.2%
sub-neg97.2%
sub-neg97.2%
+-commutative97.2%
+-commutative97.2%
Simplified97.2%
flip--97.5%
add-sqr-sqrt72.5%
+-commutative72.5%
add-sqr-sqrt98.1%
+-commutative98.1%
Applied egg-rr98.1%
associate--l+98.1%
Applied egg-rr98.1%
associate-+r-98.1%
+-commutative98.1%
associate--l+98.6%
Simplified98.6%
flip--97.4%
add-sqr-sqrt79.4%
add-sqr-sqrt97.9%
Applied egg-rr99.3%
associate--l+98.1%
+-inverses98.1%
metadata-eval98.1%
Simplified99.5%
Final simplification96.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ 1.0 z)))
(t_2 (sqrt (+ 1.0 y)))
(t_3 (- (sqrt (+ 1.0 t)) (sqrt t))))
(if (<= z 4.4e+28)
(+ (+ t_3 (/ (+ 1.0 (- z z)) (+ t_1 (sqrt z)))) (+ 1.0 (- t_2 (sqrt y))))
(+
(+ (/ 1.0 (+ t_2 (sqrt y))) (/ 1.0 (+ (sqrt x) (sqrt (+ x 1.0)))))
(+ (- t_1 (sqrt z)) t_3)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + z));
double t_2 = sqrt((1.0 + y));
double t_3 = sqrt((1.0 + t)) - sqrt(t);
double tmp;
if (z <= 4.4e+28) {
tmp = (t_3 + ((1.0 + (z - z)) / (t_1 + sqrt(z)))) + (1.0 + (t_2 - sqrt(y)));
} else {
tmp = ((1.0 / (t_2 + sqrt(y))) + (1.0 / (sqrt(x) + sqrt((x + 1.0))))) + ((t_1 - sqrt(z)) + t_3);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = sqrt((1.0d0 + z))
t_2 = sqrt((1.0d0 + y))
t_3 = sqrt((1.0d0 + t)) - sqrt(t)
if (z <= 4.4d+28) then
tmp = (t_3 + ((1.0d0 + (z - z)) / (t_1 + sqrt(z)))) + (1.0d0 + (t_2 - sqrt(y)))
else
tmp = ((1.0d0 / (t_2 + sqrt(y))) + (1.0d0 / (sqrt(x) + sqrt((x + 1.0d0))))) + ((t_1 - sqrt(z)) + t_3)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + z));
double t_2 = Math.sqrt((1.0 + y));
double t_3 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double tmp;
if (z <= 4.4e+28) {
tmp = (t_3 + ((1.0 + (z - z)) / (t_1 + Math.sqrt(z)))) + (1.0 + (t_2 - Math.sqrt(y)));
} else {
tmp = ((1.0 / (t_2 + Math.sqrt(y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((x + 1.0))))) + ((t_1 - Math.sqrt(z)) + t_3);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + z)) t_2 = math.sqrt((1.0 + y)) t_3 = math.sqrt((1.0 + t)) - math.sqrt(t) tmp = 0 if z <= 4.4e+28: tmp = (t_3 + ((1.0 + (z - z)) / (t_1 + math.sqrt(z)))) + (1.0 + (t_2 - math.sqrt(y))) else: tmp = ((1.0 / (t_2 + math.sqrt(y))) + (1.0 / (math.sqrt(x) + math.sqrt((x + 1.0))))) + ((t_1 - math.sqrt(z)) + t_3) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 + z)) t_2 = sqrt(Float64(1.0 + y)) t_3 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) tmp = 0.0 if (z <= 4.4e+28) tmp = Float64(Float64(t_3 + Float64(Float64(1.0 + Float64(z - z)) / Float64(t_1 + sqrt(z)))) + Float64(1.0 + Float64(t_2 - sqrt(y)))); else tmp = Float64(Float64(Float64(1.0 / Float64(t_2 + sqrt(y))) + Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(x + 1.0))))) + Float64(Float64(t_1 - sqrt(z)) + t_3)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + z));
t_2 = sqrt((1.0 + y));
t_3 = sqrt((1.0 + t)) - sqrt(t);
tmp = 0.0;
if (z <= 4.4e+28)
tmp = (t_3 + ((1.0 + (z - z)) / (t_1 + sqrt(z)))) + (1.0 + (t_2 - sqrt(y)));
else
tmp = ((1.0 / (t_2 + sqrt(y))) + (1.0 / (sqrt(x) + sqrt((x + 1.0))))) + ((t_1 - sqrt(z)) + t_3);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 4.4e+28], N[(N[(t$95$3 + N[(N[(1.0 + N[(z - z), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(t$95$2 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / N[(t$95$2 + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z}\\
t_2 := \sqrt{1 + y}\\
t_3 := \sqrt{1 + t} - \sqrt{t}\\
\mathbf{if}\;z \leq 4.4 \cdot 10^{+28}:\\
\;\;\;\;\left(t_3 + \frac{1 + \left(z - z\right)}{t_1 + \sqrt{z}}\right) + \left(1 + \left(t_2 - \sqrt{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{t_2 + \sqrt{y}} + \frac{1}{\sqrt{x} + \sqrt{x + 1}}\right) + \left(\left(t_1 - \sqrt{z}\right) + t_3\right)\\
\end{array}
\end{array}
if z < 4.39999999999999973e28Initial program 95.4%
associate-+l+95.4%
associate-+l-78.3%
+-commutative78.3%
sub-neg78.3%
sub-neg78.3%
+-commutative78.3%
+-commutative78.3%
Simplified78.3%
flip--79.0%
add-sqr-sqrt78.9%
+-commutative78.9%
add-sqr-sqrt79.5%
+-commutative79.5%
Applied egg-rr79.5%
associate--l+79.5%
Applied egg-rr79.5%
associate-+r-79.5%
+-commutative79.5%
associate--l+80.0%
Simplified80.0%
Taylor expanded in x around 0 55.5%
associate--l+53.9%
Simplified53.9%
if 4.39999999999999973e28 < z Initial program 87.3%
associate-+l+87.3%
associate-+l-69.2%
+-commutative69.2%
sub-neg69.2%
sub-neg69.2%
+-commutative69.2%
+-commutative69.2%
Simplified69.2%
flip--69.1%
add-sqr-sqrt55.6%
add-sqr-sqrt69.7%
Applied egg-rr69.7%
associate--l+69.7%
+-inverses69.7%
metadata-eval69.7%
Simplified69.7%
add-exp-log69.7%
associate--r-90.4%
Applied egg-rr90.4%
flip--90.5%
add-sqr-sqrt71.9%
+-commutative71.9%
add-sqr-sqrt90.5%
+-commutative90.5%
Applied egg-rr90.5%
associate--l+93.4%
+-inverses93.4%
metadata-eval93.4%
Simplified93.4%
add-exp-log93.6%
Applied egg-rr93.6%
+-commutative93.6%
Simplified93.6%
Final simplification71.7%
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.45e+26)
(+
(+
(- (sqrt (+ 1.0 t)) (sqrt t))
(/ (+ 1.0 (- z z)) (+ (sqrt (+ 1.0 z)) (sqrt z))))
(+ 1.0 (- (sqrt (+ 1.0 y)) (sqrt y))))
(/ (+ 1.0 (- x x)) (+ (sqrt x) (sqrt (+ x 1.0))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.45e+26) {
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + ((1.0 + (z - z)) / (sqrt((1.0 + z)) + sqrt(z)))) + (1.0 + (sqrt((1.0 + y)) - sqrt(y)));
} else {
tmp = (1.0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0)));
}
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.45d+26) then
tmp = ((sqrt((1.0d0 + t)) - sqrt(t)) + ((1.0d0 + (z - z)) / (sqrt((1.0d0 + z)) + sqrt(z)))) + (1.0d0 + (sqrt((1.0d0 + y)) - sqrt(y)))
else
tmp = (1.0d0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0d0)))
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.45e+26) {
tmp = ((Math.sqrt((1.0 + t)) - Math.sqrt(t)) + ((1.0 + (z - z)) / (Math.sqrt((1.0 + z)) + Math.sqrt(z)))) + (1.0 + (Math.sqrt((1.0 + y)) - Math.sqrt(y)));
} else {
tmp = (1.0 + (x - x)) / (Math.sqrt(x) + Math.sqrt((x + 1.0)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 1.45e+26: tmp = ((math.sqrt((1.0 + t)) - math.sqrt(t)) + ((1.0 + (z - z)) / (math.sqrt((1.0 + z)) + math.sqrt(z)))) + (1.0 + (math.sqrt((1.0 + y)) - math.sqrt(y))) else: tmp = (1.0 + (x - x)) / (math.sqrt(x) + math.sqrt((x + 1.0))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= 1.45e+26) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(Float64(1.0 + Float64(z - z)) / Float64(sqrt(Float64(1.0 + z)) + sqrt(z)))) + Float64(1.0 + Float64(sqrt(Float64(1.0 + y)) - sqrt(y)))); else tmp = Float64(Float64(1.0 + Float64(x - x)) / Float64(sqrt(x) + sqrt(Float64(x + 1.0)))); 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.45e+26)
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + ((1.0 + (z - z)) / (sqrt((1.0 + z)) + sqrt(z)))) + (1.0 + (sqrt((1.0 + y)) - sqrt(y)));
else
tmp = (1.0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0)));
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.45e+26], N[(N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 + N[(z - z), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(x - x), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{+26}:\\
\;\;\;\;\left(\left(\sqrt{1 + t} - \sqrt{t}\right) + \frac{1 + \left(z - z\right)}{\sqrt{1 + z} + \sqrt{z}}\right) + \left(1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + \sqrt{x + 1}}\\
\end{array}
\end{array}
if y < 1.45e26Initial program 95.0%
associate-+l+95.0%
associate-+l-62.0%
+-commutative62.0%
sub-neg62.0%
sub-neg62.0%
+-commutative62.0%
+-commutative62.0%
Simplified62.0%
flip--62.1%
add-sqr-sqrt49.4%
+-commutative49.4%
add-sqr-sqrt62.6%
+-commutative62.6%
Applied egg-rr62.6%
associate--l+62.6%
Applied egg-rr62.6%
associate-+r-62.6%
+-commutative62.6%
associate--l+63.4%
Simplified63.4%
Taylor expanded in x around 0 56.5%
associate--l+56.5%
Simplified56.5%
if 1.45e26 < y Initial program 88.0%
associate-+l+88.0%
+-commutative88.0%
associate-+r-88.0%
associate-+l-53.0%
+-commutative53.0%
associate--l+53.0%
+-commutative53.0%
Simplified37.0%
Taylor expanded in t around inf 3.2%
associate--l+4.4%
+-commutative4.4%
+-commutative4.4%
Simplified4.4%
Taylor expanded in z around inf 4.0%
+-commutative4.0%
Simplified4.0%
Taylor expanded in y around inf 21.0%
flip--21.0%
add-sqr-sqrt21.0%
+-commutative21.0%
add-sqr-sqrt21.0%
+-commutative21.0%
Applied egg-rr21.0%
+-commutative21.0%
associate--l+24.9%
+-commutative24.9%
+-commutative24.9%
Simplified24.9%
Final simplification41.7%
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 2.7e+31)
(+
(+ (- (sqrt (+ 1.0 z)) (sqrt z)) (- (sqrt (+ 1.0 t)) (sqrt t)))
(+ 1.0 (/ 1.0 (+ (sqrt (+ 1.0 y)) (sqrt y)))))
(/ (+ 1.0 (- x x)) (+ (sqrt x) (sqrt (+ x 1.0))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.7e+31) {
tmp = ((sqrt((1.0 + z)) - sqrt(z)) + (sqrt((1.0 + t)) - sqrt(t))) + (1.0 + (1.0 / (sqrt((1.0 + y)) + sqrt(y))));
} else {
tmp = (1.0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0)));
}
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 <= 2.7d+31) then
tmp = ((sqrt((1.0d0 + z)) - sqrt(z)) + (sqrt((1.0d0 + t)) - sqrt(t))) + (1.0d0 + (1.0d0 / (sqrt((1.0d0 + y)) + sqrt(y))))
else
tmp = (1.0d0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0d0)))
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 <= 2.7e+31) {
tmp = ((Math.sqrt((1.0 + z)) - Math.sqrt(z)) + (Math.sqrt((1.0 + t)) - Math.sqrt(t))) + (1.0 + (1.0 / (Math.sqrt((1.0 + y)) + Math.sqrt(y))));
} else {
tmp = (1.0 + (x - x)) / (Math.sqrt(x) + Math.sqrt((x + 1.0)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 2.7e+31: tmp = ((math.sqrt((1.0 + z)) - math.sqrt(z)) + (math.sqrt((1.0 + t)) - math.sqrt(t))) + (1.0 + (1.0 / (math.sqrt((1.0 + y)) + math.sqrt(y)))) else: tmp = (1.0 + (x - x)) / (math.sqrt(x) + math.sqrt((x + 1.0))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= 2.7e+31) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(sqrt(Float64(1.0 + t)) - sqrt(t))) + Float64(1.0 + Float64(1.0 / Float64(sqrt(Float64(1.0 + y)) + sqrt(y))))); else tmp = Float64(Float64(1.0 + Float64(x - x)) / Float64(sqrt(x) + sqrt(Float64(x + 1.0)))); 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 <= 2.7e+31)
tmp = ((sqrt((1.0 + z)) - sqrt(z)) + (sqrt((1.0 + t)) - sqrt(t))) + (1.0 + (1.0 / (sqrt((1.0 + y)) + sqrt(y))));
else
tmp = (1.0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0)));
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, 2.7e+31], 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[(1.0 + N[(1.0 / N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(x - x), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.7 \cdot 10^{+31}:\\
\;\;\;\;\left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) + \left(1 + \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + \sqrt{x + 1}}\\
\end{array}
\end{array}
if y < 2.69999999999999986e31Initial program 95.0%
associate-+l+95.0%
associate-+l-62.3%
+-commutative62.3%
sub-neg62.3%
sub-neg62.3%
+-commutative62.3%
+-commutative62.3%
Simplified62.3%
flip--62.4%
add-sqr-sqrt62.7%
add-sqr-sqrt62.9%
Applied egg-rr62.9%
associate--l+63.1%
+-inverses63.1%
metadata-eval63.1%
Simplified63.1%
Taylor expanded in x around 0 56.3%
if 2.69999999999999986e31 < y Initial program 87.9%
associate-+l+87.9%
+-commutative87.9%
associate-+r-87.9%
associate-+l-53.5%
+-commutative53.5%
associate--l+53.5%
+-commutative53.5%
Simplified37.3%
Taylor expanded in t around inf 3.2%
associate--l+4.4%
+-commutative4.4%
+-commutative4.4%
Simplified4.4%
Taylor expanded in z around inf 4.0%
+-commutative4.0%
Simplified4.0%
Taylor expanded in y around inf 21.2%
flip--21.2%
add-sqr-sqrt21.2%
+-commutative21.2%
add-sqr-sqrt21.2%
+-commutative21.2%
Applied egg-rr21.2%
+-commutative21.2%
associate--l+25.1%
+-commutative25.1%
+-commutative25.1%
Simplified25.1%
Final simplification41.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 (+ x 1.0))) (t_2 (sqrt (+ 1.0 z))))
(if (<= y 2.9e-63)
(+ (+ t_2 (- (- (hypot 1.0 (sqrt t)) (sqrt t)) (sqrt z))) 2.0)
(if (<= y 1.45e+26)
(+ t_1 (+ (- (sqrt (+ 1.0 y)) (sqrt y)) (- (- t_2 (sqrt z)) (sqrt x))))
(/ (+ 1.0 (- x x)) (+ (sqrt x) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0));
double t_2 = sqrt((1.0 + z));
double tmp;
if (y <= 2.9e-63) {
tmp = (t_2 + ((hypot(1.0, sqrt(t)) - sqrt(t)) - sqrt(z))) + 2.0;
} else if (y <= 1.45e+26) {
tmp = t_1 + ((sqrt((1.0 + y)) - sqrt(y)) + ((t_2 - sqrt(z)) - sqrt(x)));
} else {
tmp = (1.0 + (x - x)) / (sqrt(x) + t_1);
}
return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0));
double t_2 = Math.sqrt((1.0 + z));
double tmp;
if (y <= 2.9e-63) {
tmp = (t_2 + ((Math.hypot(1.0, Math.sqrt(t)) - Math.sqrt(t)) - Math.sqrt(z))) + 2.0;
} else if (y <= 1.45e+26) {
tmp = t_1 + ((Math.sqrt((1.0 + y)) - Math.sqrt(y)) + ((t_2 - Math.sqrt(z)) - Math.sqrt(x)));
} else {
tmp = (1.0 + (x - x)) / (Math.sqrt(x) + t_1);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) t_2 = math.sqrt((1.0 + z)) tmp = 0 if y <= 2.9e-63: tmp = (t_2 + ((math.hypot(1.0, math.sqrt(t)) - math.sqrt(t)) - math.sqrt(z))) + 2.0 elif y <= 1.45e+26: tmp = t_1 + ((math.sqrt((1.0 + y)) - math.sqrt(y)) + ((t_2 - math.sqrt(z)) - math.sqrt(x))) else: tmp = (1.0 + (x - x)) / (math.sqrt(x) + t_1) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(x + 1.0)) t_2 = sqrt(Float64(1.0 + z)) tmp = 0.0 if (y <= 2.9e-63) tmp = Float64(Float64(t_2 + Float64(Float64(hypot(1.0, sqrt(t)) - sqrt(t)) - sqrt(z))) + 2.0); elseif (y <= 1.45e+26) tmp = Float64(t_1 + Float64(Float64(sqrt(Float64(1.0 + y)) - sqrt(y)) + Float64(Float64(t_2 - sqrt(z)) - sqrt(x)))); else tmp = Float64(Float64(1.0 + Float64(x - x)) / Float64(sqrt(x) + t_1)); 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((x + 1.0));
t_2 = sqrt((1.0 + z));
tmp = 0.0;
if (y <= 2.9e-63)
tmp = (t_2 + ((hypot(1.0, sqrt(t)) - sqrt(t)) - sqrt(z))) + 2.0;
elseif (y <= 1.45e+26)
tmp = t_1 + ((sqrt((1.0 + y)) - sqrt(y)) + ((t_2 - sqrt(z)) - sqrt(x)));
else
tmp = (1.0 + (x - x)) / (sqrt(x) + t_1);
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[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 2.9e-63], N[(N[(t$95$2 + N[(N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[t], $MachinePrecision] ^ 2], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision], If[LessEqual[y, 1.45e+26], N[(t$95$1 + N[(N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(x - x), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1}\\
t_2 := \sqrt{1 + z}\\
\mathbf{if}\;y \leq 2.9 \cdot 10^{-63}:\\
\;\;\;\;\left(t_2 + \left(\left(\mathsf{hypot}\left(1, \sqrt{t}\right) - \sqrt{t}\right) - \sqrt{z}\right)\right) + 2\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+26}:\\
\;\;\;\;t_1 + \left(\left(\sqrt{1 + y} - \sqrt{y}\right) + \left(\left(t_2 - \sqrt{z}\right) - \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + t_1}\\
\end{array}
\end{array}
if y < 2.89999999999999975e-63Initial program 96.3%
associate-+l+96.3%
+-commutative96.3%
associate-+r-60.7%
associate-+l-55.2%
+-commutative55.2%
associate--l+55.2%
+-commutative55.2%
Simplified40.9%
Taylor expanded in y around 0 17.6%
associate--l+37.9%
associate-+r+37.8%
+-commutative37.8%
+-commutative37.8%
+-commutative37.8%
Simplified37.8%
Taylor expanded in x around 0 17.2%
associate--l+52.4%
+-commutative52.4%
associate--l+45.3%
+-commutative45.3%
associate--r+55.0%
unpow155.0%
sqr-pow55.0%
hypot-1-def55.0%
metadata-eval55.0%
unpow1/255.0%
Simplified55.0%
if 2.89999999999999975e-63 < y < 1.45e26Initial program 90.6%
associate-+l+90.6%
+-commutative90.6%
associate-+r-66.4%
associate-+l-58.0%
+-commutative58.0%
associate--l+58.0%
+-commutative58.0%
Simplified37.0%
Taylor expanded in t around inf 36.8%
+-commutative36.8%
+-commutative36.8%
associate--l+36.5%
Simplified36.5%
if 1.45e26 < y Initial program 88.0%
associate-+l+88.0%
+-commutative88.0%
associate-+r-88.0%
associate-+l-53.0%
+-commutative53.0%
associate--l+53.0%
+-commutative53.0%
Simplified37.0%
Taylor expanded in t around inf 3.2%
associate--l+4.4%
+-commutative4.4%
+-commutative4.4%
Simplified4.4%
Taylor expanded in z around inf 4.0%
+-commutative4.0%
Simplified4.0%
Taylor expanded in y around inf 21.0%
flip--21.0%
add-sqr-sqrt21.0%
+-commutative21.0%
add-sqr-sqrt21.0%
+-commutative21.0%
Applied egg-rr21.0%
+-commutative21.0%
associate--l+24.9%
+-commutative24.9%
+-commutative24.9%
Simplified24.9%
Final simplification38.7%
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.45e+26)
(+
(+ (- (sqrt (+ 1.0 z)) (sqrt z)) (- (sqrt (+ 1.0 t)) (sqrt t)))
(- (+ 1.0 (sqrt (+ 1.0 y))) (sqrt y)))
(/ (+ 1.0 (- x x)) (+ (sqrt x) (sqrt (+ x 1.0))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.45e+26) {
tmp = ((sqrt((1.0 + z)) - sqrt(z)) + (sqrt((1.0 + t)) - sqrt(t))) + ((1.0 + sqrt((1.0 + y))) - sqrt(y));
} else {
tmp = (1.0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0)));
}
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.45d+26) then
tmp = ((sqrt((1.0d0 + z)) - sqrt(z)) + (sqrt((1.0d0 + t)) - sqrt(t))) + ((1.0d0 + sqrt((1.0d0 + y))) - sqrt(y))
else
tmp = (1.0d0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0d0)))
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.45e+26) {
tmp = ((Math.sqrt((1.0 + z)) - Math.sqrt(z)) + (Math.sqrt((1.0 + t)) - Math.sqrt(t))) + ((1.0 + Math.sqrt((1.0 + y))) - Math.sqrt(y));
} else {
tmp = (1.0 + (x - x)) / (Math.sqrt(x) + Math.sqrt((x + 1.0)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 1.45e+26: tmp = ((math.sqrt((1.0 + z)) - math.sqrt(z)) + (math.sqrt((1.0 + t)) - math.sqrt(t))) + ((1.0 + math.sqrt((1.0 + y))) - math.sqrt(y)) else: tmp = (1.0 + (x - x)) / (math.sqrt(x) + math.sqrt((x + 1.0))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= 1.45e+26) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(sqrt(Float64(1.0 + t)) - sqrt(t))) + Float64(Float64(1.0 + sqrt(Float64(1.0 + y))) - sqrt(y))); else tmp = Float64(Float64(1.0 + Float64(x - x)) / Float64(sqrt(x) + sqrt(Float64(x + 1.0)))); 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.45e+26)
tmp = ((sqrt((1.0 + z)) - sqrt(z)) + (sqrt((1.0 + t)) - sqrt(t))) + ((1.0 + sqrt((1.0 + y))) - sqrt(y));
else
tmp = (1.0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0)));
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.45e+26], 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[N[(1.0 + y), $MachinePrecision]], $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[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{+26}:\\
\;\;\;\;\left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) + \left(\left(1 + \sqrt{1 + y}\right) - \sqrt{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + \sqrt{x + 1}}\\
\end{array}
\end{array}
if y < 1.45e26Initial program 95.0%
associate-+l+95.0%
associate-+l-62.0%
+-commutative62.0%
sub-neg62.0%
sub-neg62.0%
+-commutative62.0%
+-commutative62.0%
Simplified62.0%
Taylor expanded in x around 0 55.7%
if 1.45e26 < y Initial program 88.0%
associate-+l+88.0%
+-commutative88.0%
associate-+r-88.0%
associate-+l-53.0%
+-commutative53.0%
associate--l+53.0%
+-commutative53.0%
Simplified37.0%
Taylor expanded in t around inf 3.2%
associate--l+4.4%
+-commutative4.4%
+-commutative4.4%
Simplified4.4%
Taylor expanded in z around inf 4.0%
+-commutative4.0%
Simplified4.0%
Taylor expanded in y around inf 21.0%
flip--21.0%
add-sqr-sqrt21.0%
+-commutative21.0%
add-sqr-sqrt21.0%
+-commutative21.0%
Applied egg-rr21.0%
+-commutative21.0%
associate--l+24.9%
+-commutative24.9%
+-commutative24.9%
Simplified24.9%
Final simplification41.3%
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 (+ x 1.0))))
(if (<= y 1.9e-20)
(+
(+ (sqrt (+ 1.0 z)) (- (- (hypot 1.0 (sqrt t)) (sqrt t)) (sqrt z)))
2.0)
(if (<= y 5e+14)
(- (+ (sqrt (+ 1.0 y)) t_1) (+ (sqrt x) (sqrt y)))
(/ (+ 1.0 (- x x)) (+ (sqrt x) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0));
double tmp;
if (y <= 1.9e-20) {
tmp = (sqrt((1.0 + z)) + ((hypot(1.0, sqrt(t)) - sqrt(t)) - sqrt(z))) + 2.0;
} else if (y <= 5e+14) {
tmp = (sqrt((1.0 + y)) + t_1) - (sqrt(x) + sqrt(y));
} else {
tmp = (1.0 + (x - x)) / (sqrt(x) + t_1);
}
return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0));
double tmp;
if (y <= 1.9e-20) {
tmp = (Math.sqrt((1.0 + z)) + ((Math.hypot(1.0, Math.sqrt(t)) - Math.sqrt(t)) - Math.sqrt(z))) + 2.0;
} else if (y <= 5e+14) {
tmp = (Math.sqrt((1.0 + y)) + t_1) - (Math.sqrt(x) + Math.sqrt(y));
} else {
tmp = (1.0 + (x - x)) / (Math.sqrt(x) + t_1);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) tmp = 0 if y <= 1.9e-20: tmp = (math.sqrt((1.0 + z)) + ((math.hypot(1.0, math.sqrt(t)) - math.sqrt(t)) - math.sqrt(z))) + 2.0 elif y <= 5e+14: tmp = (math.sqrt((1.0 + y)) + t_1) - (math.sqrt(x) + math.sqrt(y)) else: tmp = (1.0 + (x - x)) / (math.sqrt(x) + t_1) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(x + 1.0)) tmp = 0.0 if (y <= 1.9e-20) tmp = Float64(Float64(sqrt(Float64(1.0 + z)) + Float64(Float64(hypot(1.0, sqrt(t)) - sqrt(t)) - sqrt(z))) + 2.0); elseif (y <= 5e+14) tmp = Float64(Float64(sqrt(Float64(1.0 + y)) + t_1) - Float64(sqrt(x) + sqrt(y))); else tmp = Float64(Float64(1.0 + Float64(x - x)) / Float64(sqrt(x) + t_1)); 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((x + 1.0));
tmp = 0.0;
if (y <= 1.9e-20)
tmp = (sqrt((1.0 + z)) + ((hypot(1.0, sqrt(t)) - sqrt(t)) - sqrt(z))) + 2.0;
elseif (y <= 5e+14)
tmp = (sqrt((1.0 + y)) + t_1) - (sqrt(x) + sqrt(y));
else
tmp = (1.0 + (x - x)) / (sqrt(x) + t_1);
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[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 1.9e-20], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[t], $MachinePrecision] ^ 2], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision], If[LessEqual[y, 5e+14], N[(N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(x - x), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1}\\
\mathbf{if}\;y \leq 1.9 \cdot 10^{-20}:\\
\;\;\;\;\left(\sqrt{1 + z} + \left(\left(\mathsf{hypot}\left(1, \sqrt{t}\right) - \sqrt{t}\right) - \sqrt{z}\right)\right) + 2\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+14}:\\
\;\;\;\;\left(\sqrt{1 + y} + t_1\right) - \left(\sqrt{x} + \sqrt{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + t_1}\\
\end{array}
\end{array}
if y < 1.8999999999999999e-20Initial program 96.4%
associate-+l+96.4%
+-commutative96.4%
associate-+r-62.1%
associate-+l-56.7%
+-commutative56.7%
associate--l+56.7%
+-commutative56.7%
Simplified40.2%
Taylor expanded in y around 0 17.1%
associate--l+36.7%
associate-+r+36.7%
+-commutative36.7%
+-commutative36.7%
+-commutative36.7%
Simplified36.7%
Taylor expanded in x around 0 16.8%
associate--l+52.3%
+-commutative52.3%
associate--l+45.5%
+-commutative45.5%
associate--r+55.4%
unpow155.4%
sqr-pow55.4%
hypot-1-def55.4%
metadata-eval55.4%
unpow1/255.4%
Simplified55.4%
if 1.8999999999999999e-20 < y < 5e14Initial program 89.6%
associate-+l+89.6%
+-commutative89.6%
associate-+r-59.5%
associate-+l-55.2%
+-commutative55.2%
associate--l+55.2%
+-commutative55.2%
Simplified41.6%
Taylor expanded in t around inf 18.1%
associate--l+30.0%
+-commutative30.0%
+-commutative30.0%
Simplified30.0%
Taylor expanded in z around inf 25.8%
if 5e14 < y Initial program 87.6%
associate-+l+87.6%
+-commutative87.6%
associate-+r-87.6%
associate-+l-52.4%
+-commutative52.4%
associate--l+52.4%
+-commutative52.4%
Simplified36.7%
Taylor expanded in t around inf 3.7%
associate--l+5.1%
+-commutative5.1%
+-commutative5.1%
Simplified5.1%
Taylor expanded in z around inf 4.3%
+-commutative4.3%
Simplified4.3%
Taylor expanded in y around inf 20.7%
flip--20.7%
add-sqr-sqrt20.7%
+-commutative20.7%
add-sqr-sqrt20.7%
+-commutative20.7%
Applied egg-rr20.7%
+-commutative20.7%
associate--l+24.6%
+-commutative24.6%
+-commutative24.6%
Simplified24.6%
Final simplification38.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 (sqrt (+ x 1.0))))
(if (<= y 1.04e-19)
(+ 2.0 (- (hypot 1.0 (sqrt z)) (sqrt z)))
(if (<= y 2e+16)
(+ (sqrt (+ 1.0 y)) (- t_1 (+ (sqrt x) (sqrt y))))
(/ (+ 1.0 (- x x)) (+ (sqrt x) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0));
double tmp;
if (y <= 1.04e-19) {
tmp = 2.0 + (hypot(1.0, sqrt(z)) - sqrt(z));
} else if (y <= 2e+16) {
tmp = sqrt((1.0 + y)) + (t_1 - (sqrt(x) + sqrt(y)));
} else {
tmp = (1.0 + (x - x)) / (sqrt(x) + t_1);
}
return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0));
double tmp;
if (y <= 1.04e-19) {
tmp = 2.0 + (Math.hypot(1.0, Math.sqrt(z)) - Math.sqrt(z));
} else if (y <= 2e+16) {
tmp = Math.sqrt((1.0 + y)) + (t_1 - (Math.sqrt(x) + Math.sqrt(y)));
} else {
tmp = (1.0 + (x - x)) / (Math.sqrt(x) + t_1);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) tmp = 0 if y <= 1.04e-19: tmp = 2.0 + (math.hypot(1.0, math.sqrt(z)) - math.sqrt(z)) elif y <= 2e+16: tmp = math.sqrt((1.0 + y)) + (t_1 - (math.sqrt(x) + math.sqrt(y))) else: tmp = (1.0 + (x - x)) / (math.sqrt(x) + t_1) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(x + 1.0)) tmp = 0.0 if (y <= 1.04e-19) tmp = Float64(2.0 + Float64(hypot(1.0, sqrt(z)) - sqrt(z))); elseif (y <= 2e+16) tmp = Float64(sqrt(Float64(1.0 + y)) + Float64(t_1 - Float64(sqrt(x) + sqrt(y)))); else tmp = Float64(Float64(1.0 + Float64(x - x)) / Float64(sqrt(x) + t_1)); 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((x + 1.0));
tmp = 0.0;
if (y <= 1.04e-19)
tmp = 2.0 + (hypot(1.0, sqrt(z)) - sqrt(z));
elseif (y <= 2e+16)
tmp = sqrt((1.0 + y)) + (t_1 - (sqrt(x) + sqrt(y)));
else
tmp = (1.0 + (x - x)) / (sqrt(x) + t_1);
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[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 1.04e-19], N[(2.0 + N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[z], $MachinePrecision] ^ 2], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+16], N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 - N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(x - x), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1}\\
\mathbf{if}\;y \leq 1.04 \cdot 10^{-19}:\\
\;\;\;\;2 + \left(\mathsf{hypot}\left(1, \sqrt{z}\right) - \sqrt{z}\right)\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+16}:\\
\;\;\;\;\sqrt{1 + y} + \left(t_1 - \left(\sqrt{x} + \sqrt{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + t_1}\\
\end{array}
\end{array}
if y < 1.03999999999999998e-19Initial program 96.4%
associate-+l+96.4%
+-commutative96.4%
associate-+r-62.1%
associate-+l-56.7%
+-commutative56.7%
associate--l+56.7%
+-commutative56.7%
Simplified40.2%
Taylor expanded in t around inf 24.6%
associate--l+41.1%
+-commutative41.1%
+-commutative41.1%
Simplified41.1%
Taylor expanded in x around 0 36.7%
Taylor expanded in y around 0 36.5%
associate--l+59.0%
rem-square-sqrt59.1%
hypot-1-def59.1%
Simplified59.1%
if 1.03999999999999998e-19 < y < 2e16Initial program 89.6%
associate-+l+89.6%
+-commutative89.6%
associate-+r-59.5%
associate-+l-55.2%
+-commutative55.2%
associate--l+55.2%
+-commutative55.2%
Simplified41.6%
Taylor expanded in t around inf 18.1%
associate--l+30.0%
+-commutative30.0%
+-commutative30.0%
Simplified30.0%
Taylor expanded in z around inf 33.3%
+-commutative33.3%
Simplified33.3%
if 2e16 < y Initial program 87.6%
associate-+l+87.6%
+-commutative87.6%
associate-+r-87.6%
associate-+l-52.4%
+-commutative52.4%
associate--l+52.4%
+-commutative52.4%
Simplified36.7%
Taylor expanded in t around inf 3.7%
associate--l+5.1%
+-commutative5.1%
+-commutative5.1%
Simplified5.1%
Taylor expanded in z around inf 4.3%
+-commutative4.3%
Simplified4.3%
Taylor expanded in y around inf 20.7%
flip--20.7%
add-sqr-sqrt20.7%
+-commutative20.7%
add-sqr-sqrt20.7%
+-commutative20.7%
Applied egg-rr20.7%
+-commutative20.7%
associate--l+24.6%
+-commutative24.6%
+-commutative24.6%
Simplified24.6%
Final simplification40.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 (+ x 1.0))))
(if (<= y 2e-20)
(+ 2.0 (- (hypot 1.0 (sqrt z)) (sqrt z)))
(if (<= y 5e+15)
(- (+ (sqrt (+ 1.0 y)) t_1) (+ (sqrt x) (sqrt y)))
(/ (+ 1.0 (- x x)) (+ (sqrt x) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0));
double tmp;
if (y <= 2e-20) {
tmp = 2.0 + (hypot(1.0, sqrt(z)) - sqrt(z));
} else if (y <= 5e+15) {
tmp = (sqrt((1.0 + y)) + t_1) - (sqrt(x) + sqrt(y));
} else {
tmp = (1.0 + (x - x)) / (sqrt(x) + t_1);
}
return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0));
double tmp;
if (y <= 2e-20) {
tmp = 2.0 + (Math.hypot(1.0, Math.sqrt(z)) - Math.sqrt(z));
} else if (y <= 5e+15) {
tmp = (Math.sqrt((1.0 + y)) + t_1) - (Math.sqrt(x) + Math.sqrt(y));
} else {
tmp = (1.0 + (x - x)) / (Math.sqrt(x) + t_1);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) tmp = 0 if y <= 2e-20: tmp = 2.0 + (math.hypot(1.0, math.sqrt(z)) - math.sqrt(z)) elif y <= 5e+15: tmp = (math.sqrt((1.0 + y)) + t_1) - (math.sqrt(x) + math.sqrt(y)) else: tmp = (1.0 + (x - x)) / (math.sqrt(x) + t_1) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(x + 1.0)) tmp = 0.0 if (y <= 2e-20) tmp = Float64(2.0 + Float64(hypot(1.0, sqrt(z)) - sqrt(z))); elseif (y <= 5e+15) tmp = Float64(Float64(sqrt(Float64(1.0 + y)) + t_1) - Float64(sqrt(x) + sqrt(y))); else tmp = Float64(Float64(1.0 + Float64(x - x)) / Float64(sqrt(x) + t_1)); 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((x + 1.0));
tmp = 0.0;
if (y <= 2e-20)
tmp = 2.0 + (hypot(1.0, sqrt(z)) - sqrt(z));
elseif (y <= 5e+15)
tmp = (sqrt((1.0 + y)) + t_1) - (sqrt(x) + sqrt(y));
else
tmp = (1.0 + (x - x)) / (sqrt(x) + t_1);
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[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 2e-20], N[(2.0 + N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[z], $MachinePrecision] ^ 2], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+15], N[(N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(x - x), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1}\\
\mathbf{if}\;y \leq 2 \cdot 10^{-20}:\\
\;\;\;\;2 + \left(\mathsf{hypot}\left(1, \sqrt{z}\right) - \sqrt{z}\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+15}:\\
\;\;\;\;\left(\sqrt{1 + y} + t_1\right) - \left(\sqrt{x} + \sqrt{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + t_1}\\
\end{array}
\end{array}
if y < 1.99999999999999989e-20Initial program 96.4%
associate-+l+96.4%
+-commutative96.4%
associate-+r-62.1%
associate-+l-56.7%
+-commutative56.7%
associate--l+56.7%
+-commutative56.7%
Simplified40.2%
Taylor expanded in t around inf 24.6%
associate--l+41.1%
+-commutative41.1%
+-commutative41.1%
Simplified41.1%
Taylor expanded in x around 0 36.7%
Taylor expanded in y around 0 36.5%
associate--l+59.0%
rem-square-sqrt59.1%
hypot-1-def59.1%
Simplified59.1%
if 1.99999999999999989e-20 < y < 5e15Initial program 89.6%
associate-+l+89.6%
+-commutative89.6%
associate-+r-59.5%
associate-+l-55.2%
+-commutative55.2%
associate--l+55.2%
+-commutative55.2%
Simplified41.6%
Taylor expanded in t around inf 18.1%
associate--l+30.0%
+-commutative30.0%
+-commutative30.0%
Simplified30.0%
Taylor expanded in z around inf 25.8%
if 5e15 < y Initial program 87.6%
associate-+l+87.6%
+-commutative87.6%
associate-+r-87.6%
associate-+l-52.4%
+-commutative52.4%
associate--l+52.4%
+-commutative52.4%
Simplified36.7%
Taylor expanded in t around inf 3.7%
associate--l+5.1%
+-commutative5.1%
+-commutative5.1%
Simplified5.1%
Taylor expanded in z around inf 4.3%
+-commutative4.3%
Simplified4.3%
Taylor expanded in y around inf 20.7%
flip--20.7%
add-sqr-sqrt20.7%
+-commutative20.7%
add-sqr-sqrt20.7%
+-commutative20.7%
Applied egg-rr20.7%
+-commutative20.7%
associate--l+24.6%
+-commutative24.6%
+-commutative24.6%
Simplified24.6%
Final simplification40.3%
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 2.55e-20)
(+ 2.0 (- (hypot 1.0 (sqrt z)) (sqrt z)))
(if (<= y 3.9e+17)
(+ 1.0 (- (sqrt (+ 1.0 y)) (sqrt y)))
(/ (+ 1.0 (- x x)) (+ (sqrt x) (sqrt (+ x 1.0)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.55e-20) {
tmp = 2.0 + (hypot(1.0, sqrt(z)) - sqrt(z));
} else if (y <= 3.9e+17) {
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
} else {
tmp = (1.0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0)));
}
return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.55e-20) {
tmp = 2.0 + (Math.hypot(1.0, Math.sqrt(z)) - Math.sqrt(z));
} else if (y <= 3.9e+17) {
tmp = 1.0 + (Math.sqrt((1.0 + y)) - Math.sqrt(y));
} else {
tmp = (1.0 + (x - x)) / (Math.sqrt(x) + Math.sqrt((x + 1.0)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 2.55e-20: tmp = 2.0 + (math.hypot(1.0, math.sqrt(z)) - math.sqrt(z)) elif y <= 3.9e+17: tmp = 1.0 + (math.sqrt((1.0 + y)) - math.sqrt(y)) else: tmp = (1.0 + (x - x)) / (math.sqrt(x) + math.sqrt((x + 1.0))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= 2.55e-20) tmp = Float64(2.0 + Float64(hypot(1.0, sqrt(z)) - sqrt(z))); elseif (y <= 3.9e+17) tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 + y)) - sqrt(y))); else tmp = Float64(Float64(1.0 + Float64(x - x)) / Float64(sqrt(x) + sqrt(Float64(x + 1.0)))); 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 <= 2.55e-20)
tmp = 2.0 + (hypot(1.0, sqrt(z)) - sqrt(z));
elseif (y <= 3.9e+17)
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
else
tmp = (1.0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0)));
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, 2.55e-20], N[(2.0 + N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[z], $MachinePrecision] ^ 2], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+17], 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[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.55 \cdot 10^{-20}:\\
\;\;\;\;2 + \left(\mathsf{hypot}\left(1, \sqrt{z}\right) - \sqrt{z}\right)\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+17}:\\
\;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + \sqrt{x + 1}}\\
\end{array}
\end{array}
if y < 2.55000000000000009e-20Initial program 96.4%
associate-+l+96.4%
+-commutative96.4%
associate-+r-62.1%
associate-+l-56.7%
+-commutative56.7%
associate--l+56.7%
+-commutative56.7%
Simplified40.2%
Taylor expanded in t around inf 24.6%
associate--l+41.1%
+-commutative41.1%
+-commutative41.1%
Simplified41.1%
Taylor expanded in x around 0 36.7%
Taylor expanded in y around 0 36.5%
associate--l+59.0%
rem-square-sqrt59.1%
hypot-1-def59.1%
Simplified59.1%
if 2.55000000000000009e-20 < y < 3.9e17Initial program 89.6%
associate-+l+89.6%
+-commutative89.6%
associate-+r-59.5%
associate-+l-55.2%
+-commutative55.2%
associate--l+55.2%
+-commutative55.2%
Simplified41.6%
Taylor expanded in t around inf 18.1%
associate--l+30.0%
+-commutative30.0%
+-commutative30.0%
Simplified30.0%
Taylor expanded in z around inf 33.3%
+-commutative33.3%
Simplified33.3%
Taylor expanded in x around 0 44.0%
associate--l+44.1%
Simplified44.1%
if 3.9e17 < y Initial program 87.6%
associate-+l+87.6%
+-commutative87.6%
associate-+r-87.6%
associate-+l-52.4%
+-commutative52.4%
associate--l+52.4%
+-commutative52.4%
Simplified36.7%
Taylor expanded in t around inf 3.7%
associate--l+5.1%
+-commutative5.1%
+-commutative5.1%
Simplified5.1%
Taylor expanded in z around inf 4.3%
+-commutative4.3%
Simplified4.3%
Taylor expanded in y around inf 20.7%
flip--20.7%
add-sqr-sqrt20.7%
+-commutative20.7%
add-sqr-sqrt20.7%
+-commutative20.7%
Applied egg-rr20.7%
+-commutative20.7%
associate--l+24.6%
+-commutative24.6%
+-commutative24.6%
Simplified24.6%
Final simplification41.5%
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.02e-19)
(+ (- (sqrt (+ 1.0 z)) (sqrt z)) 2.0)
(if (<= y 2e+16)
(+ 1.0 (- (sqrt (+ 1.0 y)) (sqrt y)))
(/ (+ 1.0 (- x x)) (+ (sqrt x) (sqrt (+ x 1.0)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.02e-19) {
tmp = (sqrt((1.0 + z)) - sqrt(z)) + 2.0;
} else if (y <= 2e+16) {
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
} else {
tmp = (1.0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0)));
}
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.02d-19) then
tmp = (sqrt((1.0d0 + z)) - sqrt(z)) + 2.0d0
else if (y <= 2d+16) then
tmp = 1.0d0 + (sqrt((1.0d0 + y)) - sqrt(y))
else
tmp = (1.0d0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0d0)))
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.02e-19) {
tmp = (Math.sqrt((1.0 + z)) - Math.sqrt(z)) + 2.0;
} else if (y <= 2e+16) {
tmp = 1.0 + (Math.sqrt((1.0 + y)) - Math.sqrt(y));
} else {
tmp = (1.0 + (x - x)) / (Math.sqrt(x) + Math.sqrt((x + 1.0)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 1.02e-19: tmp = (math.sqrt((1.0 + z)) - math.sqrt(z)) + 2.0 elif y <= 2e+16: tmp = 1.0 + (math.sqrt((1.0 + y)) - math.sqrt(y)) else: tmp = (1.0 + (x - x)) / (math.sqrt(x) + math.sqrt((x + 1.0))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= 1.02e-19) tmp = Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + 2.0); elseif (y <= 2e+16) tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 + y)) - sqrt(y))); else tmp = Float64(Float64(1.0 + Float64(x - x)) / Float64(sqrt(x) + sqrt(Float64(x + 1.0)))); 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.02e-19)
tmp = (sqrt((1.0 + z)) - sqrt(z)) + 2.0;
elseif (y <= 2e+16)
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
else
tmp = (1.0 + (x - x)) / (sqrt(x) + sqrt((x + 1.0)));
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.02e-19], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision], If[LessEqual[y, 2e+16], 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[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.02 \cdot 10^{-19}:\\
\;\;\;\;\left(\sqrt{1 + z} - \sqrt{z}\right) + 2\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+16}:\\
\;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\sqrt{x} + \sqrt{x + 1}}\\
\end{array}
\end{array}
if y < 1.02000000000000004e-19Initial program 96.4%
associate-+l+96.4%
+-commutative96.4%
associate-+r-62.1%
associate-+l-56.7%
+-commutative56.7%
associate--l+56.7%
+-commutative56.7%
Simplified40.2%
Taylor expanded in t around inf 24.6%
associate--l+41.1%
+-commutative41.1%
+-commutative41.1%
Simplified41.1%
Taylor expanded in x around 0 36.7%
Taylor expanded in y around 0 36.5%
associate--l+59.0%
Simplified59.0%
if 1.02000000000000004e-19 < y < 2e16Initial program 89.6%
associate-+l+89.6%
+-commutative89.6%
associate-+r-59.5%
associate-+l-55.2%
+-commutative55.2%
associate--l+55.2%
+-commutative55.2%
Simplified41.6%
Taylor expanded in t around inf 18.1%
associate--l+30.0%
+-commutative30.0%
+-commutative30.0%
Simplified30.0%
Taylor expanded in z around inf 33.3%
+-commutative33.3%
Simplified33.3%
Taylor expanded in x around 0 44.0%
associate--l+44.1%
Simplified44.1%
if 2e16 < y Initial program 87.6%
associate-+l+87.6%
+-commutative87.6%
associate-+r-87.6%
associate-+l-52.4%
+-commutative52.4%
associate--l+52.4%
+-commutative52.4%
Simplified36.7%
Taylor expanded in t around inf 3.7%
associate--l+5.1%
+-commutative5.1%
+-commutative5.1%
Simplified5.1%
Taylor expanded in z around inf 4.3%
+-commutative4.3%
Simplified4.3%
Taylor expanded in y around inf 20.7%
flip--20.7%
add-sqr-sqrt20.7%
+-commutative20.7%
add-sqr-sqrt20.7%
+-commutative20.7%
Applied egg-rr20.7%
+-commutative20.7%
associate--l+24.6%
+-commutative24.6%
+-commutative24.6%
Simplified24.6%
Final simplification41.5%
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.8) (- (+ 3.0 (* z 0.5)) (sqrt z)) (+ 1.0 (- (sqrt (+ 1.0 y)) (sqrt y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 1.8) {
tmp = (3.0 + (z * 0.5)) - sqrt(z);
} else {
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
}
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.8d0) then
tmp = (3.0d0 + (z * 0.5d0)) - sqrt(z)
else
tmp = 1.0d0 + (sqrt((1.0d0 + y)) - sqrt(y))
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.8) {
tmp = (3.0 + (z * 0.5)) - Math.sqrt(z);
} else {
tmp = 1.0 + (Math.sqrt((1.0 + y)) - Math.sqrt(y));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 1.8: tmp = (3.0 + (z * 0.5)) - math.sqrt(z) else: tmp = 1.0 + (math.sqrt((1.0 + y)) - math.sqrt(y)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= 1.8) tmp = Float64(Float64(3.0 + Float64(z * 0.5)) - sqrt(z)); else tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 + y)) - sqrt(y))); 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.8)
tmp = (3.0 + (z * 0.5)) - sqrt(z);
else
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
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.8], N[(N[(3.0 + N[(z * 0.5), $MachinePrecision]), $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.8:\\
\;\;\;\;\left(3 + z \cdot 0.5\right) - \sqrt{z}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\
\end{array}
\end{array}
if z < 1.80000000000000004Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
associate-+r-78.9%
associate-+l-53.6%
+-commutative53.6%
associate--l+53.6%
+-commutative53.6%
Simplified52.9%
Taylor expanded in t around inf 21.6%
associate--l+25.5%
+-commutative25.5%
+-commutative25.5%
Simplified25.5%
Taylor expanded in x around 0 33.6%
Taylor expanded in z around 0 33.4%
Taylor expanded in y around 0 45.9%
if 1.80000000000000004 < z Initial program 86.3%
associate-+l+86.3%
+-commutative86.3%
associate-+r-69.5%
associate-+l-55.4%
+-commutative55.4%
associate--l+55.5%
+-commutative55.5%
Simplified24.3%
Taylor expanded in t around inf 6.7%
associate--l+20.6%
+-commutative20.6%
+-commutative20.6%
Simplified20.6%
Taylor expanded in z around inf 30.6%
+-commutative30.6%
Simplified30.6%
Taylor expanded in x around 0 31.3%
associate--l+57.0%
Simplified57.0%
Final simplification51.5%
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 7e+14) (+ (- (sqrt (+ 1.0 z)) (sqrt z)) 2.0) (+ 1.0 (- (sqrt (+ 1.0 y)) (sqrt y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 7e+14) {
tmp = (sqrt((1.0 + z)) - sqrt(z)) + 2.0;
} else {
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
}
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 <= 7d+14) then
tmp = (sqrt((1.0d0 + z)) - sqrt(z)) + 2.0d0
else
tmp = 1.0d0 + (sqrt((1.0d0 + y)) - sqrt(y))
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 <= 7e+14) {
tmp = (Math.sqrt((1.0 + z)) - Math.sqrt(z)) + 2.0;
} else {
tmp = 1.0 + (Math.sqrt((1.0 + y)) - Math.sqrt(y));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 7e+14: tmp = (math.sqrt((1.0 + z)) - math.sqrt(z)) + 2.0 else: tmp = 1.0 + (math.sqrt((1.0 + y)) - math.sqrt(y)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= 7e+14) tmp = Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + 2.0); else tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 + y)) - sqrt(y))); 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 <= 7e+14)
tmp = (sqrt((1.0 + z)) - sqrt(z)) + 2.0;
else
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
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, 7e+14], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision], N[(1.0 + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 7 \cdot 10^{+14}:\\
\;\;\;\;\left(\sqrt{1 + z} - \sqrt{z}\right) + 2\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\
\end{array}
\end{array}
if z < 7e14Initial program 95.9%
associate-+l+95.9%
+-commutative95.9%
associate-+r-78.4%
associate-+l-54.4%
+-commutative54.4%
associate--l+54.4%
+-commutative54.4%
Simplified51.6%
Taylor expanded in t around inf 23.0%
associate--l+26.8%
+-commutative26.8%
+-commutative26.8%
Simplified26.8%
Taylor expanded in x around 0 34.9%
Taylor expanded in y around 0 46.9%
associate--l+46.9%
Simplified46.9%
if 7e14 < z Initial program 86.9%
associate-+l+86.9%
+-commutative86.9%
associate-+r-69.4%
associate-+l-54.7%
+-commutative54.7%
associate--l+54.7%
+-commutative54.7%
Simplified23.6%
Taylor expanded in t around inf 3.9%
associate--l+18.8%
+-commutative18.8%
+-commutative18.8%
Simplified18.8%
Taylor expanded in z around inf 30.9%
+-commutative30.9%
Simplified30.9%
Taylor expanded in x around 0 31.6%
associate--l+59.0%
Simplified59.0%
Final simplification52.5%
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 7e+14) (- (+ (sqrt (+ 1.0 z)) 2.0) (sqrt z)) (+ 1.0 (- (sqrt (+ 1.0 y)) (sqrt y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 7e+14) {
tmp = (sqrt((1.0 + z)) + 2.0) - sqrt(z);
} else {
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
}
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 <= 7d+14) then
tmp = (sqrt((1.0d0 + z)) + 2.0d0) - sqrt(z)
else
tmp = 1.0d0 + (sqrt((1.0d0 + y)) - sqrt(y))
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 <= 7e+14) {
tmp = (Math.sqrt((1.0 + z)) + 2.0) - Math.sqrt(z);
} else {
tmp = 1.0 + (Math.sqrt((1.0 + y)) - Math.sqrt(y));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 7e+14: tmp = (math.sqrt((1.0 + z)) + 2.0) - math.sqrt(z) else: tmp = 1.0 + (math.sqrt((1.0 + y)) - math.sqrt(y)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= 7e+14) tmp = Float64(Float64(sqrt(Float64(1.0 + z)) + 2.0) - sqrt(z)); else tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 + y)) - sqrt(y))); 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 <= 7e+14)
tmp = (sqrt((1.0 + z)) + 2.0) - sqrt(z);
else
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
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, 7e+14], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + 2.0), $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 7 \cdot 10^{+14}:\\
\;\;\;\;\left(\sqrt{1 + z} + 2\right) - \sqrt{z}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\
\end{array}
\end{array}
if z < 7e14Initial program 95.9%
associate-+l+95.9%
+-commutative95.9%
associate-+r-78.4%
associate-+l-54.4%
+-commutative54.4%
associate--l+54.4%
+-commutative54.4%
Simplified51.6%
Taylor expanded in t around inf 23.0%
associate--l+26.8%
+-commutative26.8%
+-commutative26.8%
Simplified26.8%
Taylor expanded in x around 0 34.9%
Taylor expanded in y around 0 46.9%
if 7e14 < z Initial program 86.9%
associate-+l+86.9%
+-commutative86.9%
associate-+r-69.4%
associate-+l-54.7%
+-commutative54.7%
associate--l+54.7%
+-commutative54.7%
Simplified23.6%
Taylor expanded in t around inf 3.9%
associate--l+18.8%
+-commutative18.8%
+-commutative18.8%
Simplified18.8%
Taylor expanded in z around inf 30.9%
+-commutative30.9%
Simplified30.9%
Taylor expanded in x around 0 31.6%
associate--l+59.0%
Simplified59.0%
Final simplification52.5%
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 7.4) (- (+ 3.0 (* z 0.5)) (sqrt z)) (- (sqrt (+ x 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 <= 7.4) {
tmp = (3.0 + (z * 0.5)) - sqrt(z);
} else {
tmp = sqrt((x + 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 <= 7.4d0) then
tmp = (3.0d0 + (z * 0.5d0)) - sqrt(z)
else
tmp = sqrt((x + 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 <= 7.4) {
tmp = (3.0 + (z * 0.5)) - Math.sqrt(z);
} else {
tmp = Math.sqrt((x + 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 <= 7.4: tmp = (3.0 + (z * 0.5)) - math.sqrt(z) else: tmp = math.sqrt((x + 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 <= 7.4) tmp = Float64(Float64(3.0 + Float64(z * 0.5)) - sqrt(z)); else tmp = Float64(sqrt(Float64(x + 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 <= 7.4)
tmp = (3.0 + (z * 0.5)) - sqrt(z);
else
tmp = sqrt((x + 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, 7.4], N[(N[(3.0 + N[(z * 0.5), $MachinePrecision]), $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 7.4:\\
\;\;\;\;\left(3 + z \cdot 0.5\right) - \sqrt{z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x + 1} - \sqrt{x}\\
\end{array}
\end{array}
if z < 7.4000000000000004Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
associate-+r-78.9%
associate-+l-53.6%
+-commutative53.6%
associate--l+53.6%
+-commutative53.6%
Simplified52.9%
Taylor expanded in t around inf 21.6%
associate--l+25.5%
+-commutative25.5%
+-commutative25.5%
Simplified25.5%
Taylor expanded in x around 0 33.6%
Taylor expanded in z around 0 33.4%
Taylor expanded in y around 0 45.9%
if 7.4000000000000004 < z Initial program 86.3%
associate-+l+86.3%
+-commutative86.3%
associate-+r-69.5%
associate-+l-55.4%
+-commutative55.4%
associate--l+55.5%
+-commutative55.5%
Simplified24.3%
Taylor expanded in t around inf 6.7%
associate--l+20.6%
+-commutative20.6%
+-commutative20.6%
Simplified20.6%
Taylor expanded in z around inf 30.6%
+-commutative30.6%
Simplified30.6%
Taylor expanded in y around inf 21.8%
Final simplification33.8%
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 11.0) (- (+ 3.0 (* z 0.5)) (sqrt z)) (- 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 <= 11.0) {
tmp = (3.0 + (z * 0.5)) - sqrt(z);
} else {
tmp = 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 <= 11.0d0) then
tmp = (3.0d0 + (z * 0.5d0)) - sqrt(z)
else
tmp = 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 <= 11.0) {
tmp = (3.0 + (z * 0.5)) - Math.sqrt(z);
} else {
tmp = 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 <= 11.0: tmp = (3.0 + (z * 0.5)) - math.sqrt(z) else: tmp = 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 <= 11.0) tmp = Float64(Float64(3.0 + Float64(z * 0.5)) - sqrt(z)); else tmp = 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 <= 11.0)
tmp = (3.0 + (z * 0.5)) - sqrt(z);
else
tmp = 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, 11.0], N[(N[(3.0 + N[(z * 0.5), $MachinePrecision]), $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision], N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 11:\\
\;\;\;\;\left(3 + z \cdot 0.5\right) - \sqrt{z}\\
\mathbf{else}:\\
\;\;\;\;1 - \sqrt{x}\\
\end{array}
\end{array}
if z < 11Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
associate-+r-78.9%
associate-+l-53.6%
+-commutative53.6%
associate--l+53.6%
+-commutative53.6%
Simplified52.9%
Taylor expanded in t around inf 21.6%
associate--l+25.5%
+-commutative25.5%
+-commutative25.5%
Simplified25.5%
Taylor expanded in x around 0 33.6%
Taylor expanded in z around 0 33.4%
Taylor expanded in y around 0 45.9%
if 11 < z Initial program 86.3%
associate-+l+86.3%
+-commutative86.3%
associate-+r-69.5%
associate-+l-55.4%
+-commutative55.4%
associate--l+55.5%
+-commutative55.5%
Simplified24.3%
Taylor expanded in t around inf 6.7%
associate--l+20.6%
+-commutative20.6%
+-commutative20.6%
Simplified20.6%
Taylor expanded in z around inf 30.6%
+-commutative30.6%
Simplified30.6%
Taylor expanded in y around inf 21.8%
Taylor expanded in x around 0 20.7%
Final simplification33.3%
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 10.5) (- (+ 3.0 (* z 0.5)) (sqrt z)) (- (+ 1.0 (* x 0.5)) (sqrt x))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 10.5) {
tmp = (3.0 + (z * 0.5)) - sqrt(z);
} else {
tmp = (1.0 + (x * 0.5)) - 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 <= 10.5d0) then
tmp = (3.0d0 + (z * 0.5d0)) - sqrt(z)
else
tmp = (1.0d0 + (x * 0.5d0)) - 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 <= 10.5) {
tmp = (3.0 + (z * 0.5)) - Math.sqrt(z);
} else {
tmp = (1.0 + (x * 0.5)) - Math.sqrt(x);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 10.5: tmp = (3.0 + (z * 0.5)) - math.sqrt(z) else: tmp = (1.0 + (x * 0.5)) - 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 <= 10.5) tmp = Float64(Float64(3.0 + Float64(z * 0.5)) - sqrt(z)); else tmp = Float64(Float64(1.0 + Float64(x * 0.5)) - 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 <= 10.5)
tmp = (3.0 + (z * 0.5)) - sqrt(z);
else
tmp = (1.0 + (x * 0.5)) - 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, 10.5], N[(N[(3.0 + N[(z * 0.5), $MachinePrecision]), $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 10.5:\\
\;\;\;\;\left(3 + z \cdot 0.5\right) - \sqrt{z}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + x \cdot 0.5\right) - \sqrt{x}\\
\end{array}
\end{array}
if z < 10.5Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
associate-+r-78.9%
associate-+l-53.6%
+-commutative53.6%
associate--l+53.6%
+-commutative53.6%
Simplified52.9%
Taylor expanded in t around inf 21.6%
associate--l+25.5%
+-commutative25.5%
+-commutative25.5%
Simplified25.5%
Taylor expanded in x around 0 33.6%
Taylor expanded in z around 0 33.4%
Taylor expanded in y around 0 45.9%
if 10.5 < z Initial program 86.3%
associate-+l+86.3%
+-commutative86.3%
associate-+r-69.5%
associate-+l-55.4%
+-commutative55.4%
associate--l+55.5%
+-commutative55.5%
Simplified24.3%
Taylor expanded in t around inf 6.7%
associate--l+20.6%
+-commutative20.6%
+-commutative20.6%
Simplified20.6%
Taylor expanded in z around inf 30.6%
+-commutative30.6%
Simplified30.6%
Taylor expanded in y around inf 21.8%
Taylor expanded in x around 0 22.5%
Final simplification34.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (- 1.0 (sqrt x)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 - sqrt(x);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 1.0d0 - sqrt(x)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 - Math.sqrt(x);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 - math.sqrt(x)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 - sqrt(x)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 - sqrt(x);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 - \sqrt{x}
\end{array}
Initial program 91.7%
associate-+l+91.7%
+-commutative91.7%
associate-+r-74.2%
associate-+l-54.5%
+-commutative54.5%
associate--l+54.5%
+-commutative54.5%
Simplified38.6%
Taylor expanded in t around inf 14.1%
associate--l+23.1%
+-commutative23.1%
+-commutative23.1%
Simplified23.1%
Taylor expanded in z around inf 21.2%
+-commutative21.2%
Simplified21.2%
Taylor expanded in y around inf 16.1%
Taylor expanded in x around 0 14.9%
Final simplification14.9%
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))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 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
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;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return z * 0.5
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(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;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(z * 0.5), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
z \cdot 0.5
\end{array}
Initial program 91.7%
associate-+l+91.7%
+-commutative91.7%
associate-+r-74.2%
associate-+l-54.5%
+-commutative54.5%
associate--l+54.5%
+-commutative54.5%
Simplified38.6%
Taylor expanded in t around inf 14.1%
associate--l+23.1%
+-commutative23.1%
+-commutative23.1%
Simplified23.1%
Taylor expanded in x around 0 20.9%
Taylor expanded in z around 0 19.2%
Taylor expanded in z around inf 5.2%
Final simplification5.2%
(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 2023257
(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))))