
(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 28 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 x)))
(t_2 (- (sqrt (+ y 1.0)) (sqrt y)))
(t_3 (sqrt (+ 1.0 z)))
(t_4 (- (sqrt (+ 1.0 t)) (sqrt t))))
(if (<= t_2 4e-5)
(+
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ t_1 (sqrt x))))
(+ (- t_3 (sqrt z)) t_4))
(+ (+ (- t_1 (sqrt x)) t_2) (+ t_4 (/ 1.0 (+ t_3 (sqrt z))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + x));
double t_2 = sqrt((y + 1.0)) - sqrt(y);
double t_3 = sqrt((1.0 + z));
double t_4 = sqrt((1.0 + t)) - sqrt(t);
double tmp;
if (t_2 <= 4e-5) {
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (t_1 + sqrt(x)))) + ((t_3 - sqrt(z)) + t_4);
} else {
tmp = ((t_1 - sqrt(x)) + t_2) + (t_4 + (1.0 / (t_3 + 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((1.0d0 + x))
t_2 = sqrt((y + 1.0d0)) - sqrt(y)
t_3 = sqrt((1.0d0 + z))
t_4 = sqrt((1.0d0 + t)) - sqrt(t)
if (t_2 <= 4d-5) then
tmp = ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (t_1 + sqrt(x)))) + ((t_3 - sqrt(z)) + t_4)
else
tmp = ((t_1 - sqrt(x)) + t_2) + (t_4 + (1.0d0 / (t_3 + 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((1.0 + x));
double t_2 = Math.sqrt((y + 1.0)) - Math.sqrt(y);
double t_3 = Math.sqrt((1.0 + z));
double t_4 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double tmp;
if (t_2 <= 4e-5) {
tmp = ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (t_1 + Math.sqrt(x)))) + ((t_3 - Math.sqrt(z)) + t_4);
} else {
tmp = ((t_1 - Math.sqrt(x)) + t_2) + (t_4 + (1.0 / (t_3 + Math.sqrt(z))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + x)) t_2 = math.sqrt((y + 1.0)) - math.sqrt(y) t_3 = math.sqrt((1.0 + z)) t_4 = math.sqrt((1.0 + t)) - math.sqrt(t) tmp = 0 if t_2 <= 4e-5: tmp = ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (t_1 + math.sqrt(x)))) + ((t_3 - math.sqrt(z)) + t_4) else: tmp = ((t_1 - math.sqrt(x)) + t_2) + (t_4 + (1.0 / (t_3 + math.sqrt(z)))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 + x)) t_2 = Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) t_3 = sqrt(Float64(1.0 + z)) t_4 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) tmp = 0.0 if (t_2 <= 4e-5) tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(t_1 + sqrt(x)))) + Float64(Float64(t_3 - sqrt(z)) + t_4)); else tmp = Float64(Float64(Float64(t_1 - sqrt(x)) + t_2) + Float64(t_4 + Float64(1.0 / Float64(t_3 + 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((1.0 + x));
t_2 = sqrt((y + 1.0)) - sqrt(y);
t_3 = sqrt((1.0 + z));
t_4 = sqrt((1.0 + t)) - sqrt(t);
tmp = 0.0;
if (t_2 <= 4e-5)
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (t_1 + sqrt(x)))) + ((t_3 - sqrt(z)) + t_4);
else
tmp = ((t_1 - sqrt(x)) + t_2) + (t_4 + (1.0 / (t_3 + 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[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 4e-5], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$1 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$1 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] + N[(t$95$4 + N[(1.0 / N[(t$95$3 + 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{1 + x}\\
t_2 := \sqrt{y + 1} - \sqrt{y}\\
t_3 := \sqrt{1 + z}\\
t_4 := \sqrt{1 + t} - \sqrt{t}\\
\mathbf{if}\;t\_2 \leq 4 \cdot 10^{-5}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{t\_1 + \sqrt{x}}\right) + \left(\left(t\_3 - \sqrt{z}\right) + t\_4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t\_1 - \sqrt{x}\right) + t\_2\right) + \left(t\_4 + \frac{1}{t\_3 + \sqrt{z}}\right)\\
\end{array}
\end{array}
if (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y)) < 4.00000000000000033e-5Initial program 85.7%
associate-+l+85.7%
+-commutative85.7%
+-commutative85.7%
+-commutative85.7%
Simplified85.7%
flip--85.8%
add-sqr-sqrt65.9%
+-commutative65.9%
add-sqr-sqrt86.4%
+-commutative86.4%
Applied egg-rr86.4%
associate--l+89.0%
+-inverses89.0%
metadata-eval89.0%
Simplified89.0%
Taylor expanded in y around inf 93.2%
if 4.00000000000000033e-5 < (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y)) Initial program 97.0%
associate-+l+97.0%
+-commutative97.0%
+-commutative97.0%
+-commutative97.0%
Simplified97.0%
flip--97.2%
add-sqr-sqrt79.2%
add-sqr-sqrt97.9%
Applied egg-rr97.9%
associate--l+98.1%
+-inverses98.1%
metadata-eval98.1%
+-commutative98.1%
Simplified98.1%
Final simplification95.5%
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 t)) (sqrt t)))
(t_2 (sqrt (+ 1.0 x)))
(t_3 (sqrt (+ 1.0 z)))
(t_4 (sqrt (+ y 1.0))))
(if (<= (+ (- t_2 (sqrt x)) (- t_4 (sqrt y))) 0.99999996)
(+
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ t_2 (sqrt x))))
(+ (- t_3 (sqrt z)) t_1))
(+
(+ t_1 (/ 1.0 (+ t_3 (sqrt z))))
(+ (- 1.0 (sqrt x)) (/ 1.0 (+ (sqrt y) t_4)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + t)) - sqrt(t);
double t_2 = sqrt((1.0 + x));
double t_3 = sqrt((1.0 + z));
double t_4 = sqrt((y + 1.0));
double tmp;
if (((t_2 - sqrt(x)) + (t_4 - sqrt(y))) <= 0.99999996) {
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (t_2 + sqrt(x)))) + ((t_3 - sqrt(z)) + t_1);
} else {
tmp = (t_1 + (1.0 / (t_3 + sqrt(z)))) + ((1.0 - sqrt(x)) + (1.0 / (sqrt(y) + t_4)));
}
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((1.0d0 + t)) - sqrt(t)
t_2 = sqrt((1.0d0 + x))
t_3 = sqrt((1.0d0 + z))
t_4 = sqrt((y + 1.0d0))
if (((t_2 - sqrt(x)) + (t_4 - sqrt(y))) <= 0.99999996d0) then
tmp = ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (t_2 + sqrt(x)))) + ((t_3 - sqrt(z)) + t_1)
else
tmp = (t_1 + (1.0d0 / (t_3 + sqrt(z)))) + ((1.0d0 - sqrt(x)) + (1.0d0 / (sqrt(y) + t_4)))
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 + t)) - Math.sqrt(t);
double t_2 = Math.sqrt((1.0 + x));
double t_3 = Math.sqrt((1.0 + z));
double t_4 = Math.sqrt((y + 1.0));
double tmp;
if (((t_2 - Math.sqrt(x)) + (t_4 - Math.sqrt(y))) <= 0.99999996) {
tmp = ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (t_2 + Math.sqrt(x)))) + ((t_3 - Math.sqrt(z)) + t_1);
} else {
tmp = (t_1 + (1.0 / (t_3 + Math.sqrt(z)))) + ((1.0 - Math.sqrt(x)) + (1.0 / (Math.sqrt(y) + t_4)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + t)) - math.sqrt(t) t_2 = math.sqrt((1.0 + x)) t_3 = math.sqrt((1.0 + z)) t_4 = math.sqrt((y + 1.0)) tmp = 0 if ((t_2 - math.sqrt(x)) + (t_4 - math.sqrt(y))) <= 0.99999996: tmp = ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (t_2 + math.sqrt(x)))) + ((t_3 - math.sqrt(z)) + t_1) else: tmp = (t_1 + (1.0 / (t_3 + math.sqrt(z)))) + ((1.0 - math.sqrt(x)) + (1.0 / (math.sqrt(y) + t_4))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) t_2 = sqrt(Float64(1.0 + x)) t_3 = sqrt(Float64(1.0 + z)) t_4 = sqrt(Float64(y + 1.0)) tmp = 0.0 if (Float64(Float64(t_2 - sqrt(x)) + Float64(t_4 - sqrt(y))) <= 0.99999996) tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(t_2 + sqrt(x)))) + Float64(Float64(t_3 - sqrt(z)) + t_1)); else tmp = Float64(Float64(t_1 + Float64(1.0 / Float64(t_3 + sqrt(z)))) + Float64(Float64(1.0 - sqrt(x)) + Float64(1.0 / Float64(sqrt(y) + t_4)))); 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 + t)) - sqrt(t);
t_2 = sqrt((1.0 + x));
t_3 = sqrt((1.0 + z));
t_4 = sqrt((y + 1.0));
tmp = 0.0;
if (((t_2 - sqrt(x)) + (t_4 - sqrt(y))) <= 0.99999996)
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (t_2 + sqrt(x)))) + ((t_3 - sqrt(z)) + t_1);
else
tmp = (t_1 + (1.0 / (t_3 + sqrt(z)))) + ((1.0 - sqrt(x)) + (1.0 / (sqrt(y) + t_4)));
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 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(t$95$4 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.99999996], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$2 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(1.0 / N[(t$95$3 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + t} - \sqrt{t}\\
t_2 := \sqrt{1 + x}\\
t_3 := \sqrt{1 + z}\\
t_4 := \sqrt{y + 1}\\
\mathbf{if}\;\left(t\_2 - \sqrt{x}\right) + \left(t\_4 - \sqrt{y}\right) \leq 0.99999996:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{t\_2 + \sqrt{x}}\right) + \left(\left(t\_3 - \sqrt{z}\right) + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 + \frac{1}{t\_3 + \sqrt{z}}\right) + \left(\left(1 - \sqrt{x}\right) + \frac{1}{\sqrt{y} + t\_4}\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) < 0.99999996000000002Initial program 79.0%
associate-+l+79.0%
+-commutative79.0%
+-commutative79.0%
+-commutative79.0%
Simplified79.0%
flip--79.2%
add-sqr-sqrt44.7%
+-commutative44.7%
add-sqr-sqrt80.2%
+-commutative80.2%
Applied egg-rr80.2%
associate--l+84.3%
+-inverses84.3%
metadata-eval84.3%
Simplified84.3%
Taylor expanded in y around inf 87.7%
if 0.99999996000000002 < (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) Initial program 96.8%
associate-+l+96.8%
+-commutative96.8%
+-commutative96.8%
+-commutative96.8%
Simplified96.8%
Taylor expanded in x around 0 68.4%
flip--96.9%
add-sqr-sqrt76.2%
add-sqr-sqrt97.7%
Applied egg-rr68.8%
associate--l+98.0%
+-inverses98.0%
metadata-eval98.0%
+-commutative98.0%
Simplified69.1%
flip--69.3%
add-sqr-sqrt53.5%
add-sqr-sqrt69.3%
Applied egg-rr69.3%
associate--l+69.4%
+-inverses69.4%
metadata-eval69.4%
+-commutative69.4%
Simplified69.4%
Final simplification75.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 (+ y 1.0))) (t_2 (sqrt (+ 1.0 x))) (t_3 (sqrt (+ 1.0 z))))
(if (<= (- t_2 (sqrt x)) 0.99999996)
(+ (- t_3 (sqrt z)) (+ (- t_1 (sqrt y)) (/ 1.0 (+ t_2 (sqrt x)))))
(+
(+ (- (sqrt (+ 1.0 t)) (sqrt t)) (/ 1.0 (+ t_3 (sqrt z))))
(+ (- 1.0 (sqrt x)) (/ 1.0 (+ (sqrt y) t_1)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((y + 1.0));
double t_2 = sqrt((1.0 + x));
double t_3 = sqrt((1.0 + z));
double tmp;
if ((t_2 - sqrt(x)) <= 0.99999996) {
tmp = (t_3 - sqrt(z)) + ((t_1 - sqrt(y)) + (1.0 / (t_2 + sqrt(x))));
} else {
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + (1.0 / (t_3 + sqrt(z)))) + ((1.0 - sqrt(x)) + (1.0 / (sqrt(y) + t_1)));
}
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((y + 1.0d0))
t_2 = sqrt((1.0d0 + x))
t_3 = sqrt((1.0d0 + z))
if ((t_2 - sqrt(x)) <= 0.99999996d0) then
tmp = (t_3 - sqrt(z)) + ((t_1 - sqrt(y)) + (1.0d0 / (t_2 + sqrt(x))))
else
tmp = ((sqrt((1.0d0 + t)) - sqrt(t)) + (1.0d0 / (t_3 + sqrt(z)))) + ((1.0d0 - sqrt(x)) + (1.0d0 / (sqrt(y) + t_1)))
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((y + 1.0));
double t_2 = Math.sqrt((1.0 + x));
double t_3 = Math.sqrt((1.0 + z));
double tmp;
if ((t_2 - Math.sqrt(x)) <= 0.99999996) {
tmp = (t_3 - Math.sqrt(z)) + ((t_1 - Math.sqrt(y)) + (1.0 / (t_2 + Math.sqrt(x))));
} else {
tmp = ((Math.sqrt((1.0 + t)) - Math.sqrt(t)) + (1.0 / (t_3 + Math.sqrt(z)))) + ((1.0 - Math.sqrt(x)) + (1.0 / (Math.sqrt(y) + t_1)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((y + 1.0)) t_2 = math.sqrt((1.0 + x)) t_3 = math.sqrt((1.0 + z)) tmp = 0 if (t_2 - math.sqrt(x)) <= 0.99999996: tmp = (t_3 - math.sqrt(z)) + ((t_1 - math.sqrt(y)) + (1.0 / (t_2 + math.sqrt(x)))) else: tmp = ((math.sqrt((1.0 + t)) - math.sqrt(t)) + (1.0 / (t_3 + math.sqrt(z)))) + ((1.0 - math.sqrt(x)) + (1.0 / (math.sqrt(y) + t_1))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(y + 1.0)) t_2 = sqrt(Float64(1.0 + x)) t_3 = sqrt(Float64(1.0 + z)) tmp = 0.0 if (Float64(t_2 - sqrt(x)) <= 0.99999996) tmp = Float64(Float64(t_3 - sqrt(z)) + Float64(Float64(t_1 - sqrt(y)) + Float64(1.0 / Float64(t_2 + sqrt(x))))); else tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(1.0 / Float64(t_3 + sqrt(z)))) + Float64(Float64(1.0 - sqrt(x)) + Float64(1.0 / Float64(sqrt(y) + 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((y + 1.0));
t_2 = sqrt((1.0 + x));
t_3 = sqrt((1.0 + z));
tmp = 0.0;
if ((t_2 - sqrt(x)) <= 0.99999996)
tmp = (t_3 - sqrt(z)) + ((t_1 - sqrt(y)) + (1.0 / (t_2 + sqrt(x))));
else
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + (1.0 / (t_3 + sqrt(z)))) + ((1.0 - sqrt(x)) + (1.0 / (sqrt(y) + 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[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], 0.99999996], N[(N[(t$95$3 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$2 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$3 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{y + 1}\\
t_2 := \sqrt{1 + x}\\
t_3 := \sqrt{1 + z}\\
\mathbf{if}\;t\_2 - \sqrt{x} \leq 0.99999996:\\
\;\;\;\;\left(t\_3 - \sqrt{z}\right) + \left(\left(t\_1 - \sqrt{y}\right) + \frac{1}{t\_2 + \sqrt{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\sqrt{1 + t} - \sqrt{t}\right) + \frac{1}{t\_3 + \sqrt{z}}\right) + \left(\left(1 - \sqrt{x}\right) + \frac{1}{\sqrt{y} + t\_1}\right)\\
\end{array}
\end{array}
if (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) < 0.99999996000000002Initial program 85.5%
associate-+l+85.5%
+-commutative85.5%
+-commutative85.5%
+-commutative85.5%
Simplified85.5%
flip--85.6%
add-sqr-sqrt46.5%
+-commutative46.5%
add-sqr-sqrt86.2%
+-commutative86.2%
Applied egg-rr86.2%
associate--l+89.0%
+-inverses89.0%
metadata-eval89.0%
Simplified89.0%
Taylor expanded in t around inf 49.2%
if 0.99999996000000002 < (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) Initial program 97.4%
associate-+l+97.4%
+-commutative97.4%
+-commutative97.4%
+-commutative97.4%
Simplified97.4%
Taylor expanded in x around 0 97.4%
flip--97.4%
add-sqr-sqrt75.0%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
associate--l+98.4%
+-inverses98.4%
metadata-eval98.4%
+-commutative98.4%
Simplified98.4%
flip--98.7%
add-sqr-sqrt75.8%
add-sqr-sqrt98.8%
Applied egg-rr98.8%
associate--l+98.9%
+-inverses98.9%
metadata-eval98.9%
+-commutative98.9%
Simplified98.9%
Final simplification72.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 (+ y 1.0)) (sqrt y)))
(t_2 (sqrt (+ 1.0 x)))
(t_3 (sqrt (+ 1.0 z))))
(if (<= (- t_2 (sqrt x)) 0.99999996)
(+ (- t_3 (sqrt z)) (+ t_1 (/ 1.0 (+ t_2 (sqrt x)))))
(+
(+ (- (sqrt (+ 1.0 t)) (sqrt t)) (/ 1.0 (+ t_3 (sqrt z))))
(+ t_1 (- 1.0 (sqrt x)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((y + 1.0)) - sqrt(y);
double t_2 = sqrt((1.0 + x));
double t_3 = sqrt((1.0 + z));
double tmp;
if ((t_2 - sqrt(x)) <= 0.99999996) {
tmp = (t_3 - sqrt(z)) + (t_1 + (1.0 / (t_2 + sqrt(x))));
} else {
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + (1.0 / (t_3 + sqrt(z)))) + (t_1 + (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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = sqrt((y + 1.0d0)) - sqrt(y)
t_2 = sqrt((1.0d0 + x))
t_3 = sqrt((1.0d0 + z))
if ((t_2 - sqrt(x)) <= 0.99999996d0) then
tmp = (t_3 - sqrt(z)) + (t_1 + (1.0d0 / (t_2 + sqrt(x))))
else
tmp = ((sqrt((1.0d0 + t)) - sqrt(t)) + (1.0d0 / (t_3 + sqrt(z)))) + (t_1 + (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 t_1 = Math.sqrt((y + 1.0)) - Math.sqrt(y);
double t_2 = Math.sqrt((1.0 + x));
double t_3 = Math.sqrt((1.0 + z));
double tmp;
if ((t_2 - Math.sqrt(x)) <= 0.99999996) {
tmp = (t_3 - Math.sqrt(z)) + (t_1 + (1.0 / (t_2 + Math.sqrt(x))));
} else {
tmp = ((Math.sqrt((1.0 + t)) - Math.sqrt(t)) + (1.0 / (t_3 + Math.sqrt(z)))) + (t_1 + (1.0 - Math.sqrt(x)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((y + 1.0)) - math.sqrt(y) t_2 = math.sqrt((1.0 + x)) t_3 = math.sqrt((1.0 + z)) tmp = 0 if (t_2 - math.sqrt(x)) <= 0.99999996: tmp = (t_3 - math.sqrt(z)) + (t_1 + (1.0 / (t_2 + math.sqrt(x)))) else: tmp = ((math.sqrt((1.0 + t)) - math.sqrt(t)) + (1.0 / (t_3 + math.sqrt(z)))) + (t_1 + (1.0 - math.sqrt(x))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) t_2 = sqrt(Float64(1.0 + x)) t_3 = sqrt(Float64(1.0 + z)) tmp = 0.0 if (Float64(t_2 - sqrt(x)) <= 0.99999996) tmp = Float64(Float64(t_3 - sqrt(z)) + Float64(t_1 + Float64(1.0 / Float64(t_2 + sqrt(x))))); else tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(1.0 / Float64(t_3 + sqrt(z)))) + Float64(t_1 + 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)
t_1 = sqrt((y + 1.0)) - sqrt(y);
t_2 = sqrt((1.0 + x));
t_3 = sqrt((1.0 + z));
tmp = 0.0;
if ((t_2 - sqrt(x)) <= 0.99999996)
tmp = (t_3 - sqrt(z)) + (t_1 + (1.0 / (t_2 + sqrt(x))));
else
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + (1.0 / (t_3 + sqrt(z)))) + (t_1 + (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_] := Block[{t$95$1 = N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], 0.99999996], N[(N[(t$95$3 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(1.0 / N[(t$95$2 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$3 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + 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}
t_1 := \sqrt{y + 1} - \sqrt{y}\\
t_2 := \sqrt{1 + x}\\
t_3 := \sqrt{1 + z}\\
\mathbf{if}\;t\_2 - \sqrt{x} \leq 0.99999996:\\
\;\;\;\;\left(t\_3 - \sqrt{z}\right) + \left(t\_1 + \frac{1}{t\_2 + \sqrt{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\sqrt{1 + t} - \sqrt{t}\right) + \frac{1}{t\_3 + \sqrt{z}}\right) + \left(t\_1 + \left(1 - \sqrt{x}\right)\right)\\
\end{array}
\end{array}
if (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) < 0.99999996000000002Initial program 85.5%
associate-+l+85.5%
+-commutative85.5%
+-commutative85.5%
+-commutative85.5%
Simplified85.5%
flip--85.6%
add-sqr-sqrt46.5%
+-commutative46.5%
add-sqr-sqrt86.2%
+-commutative86.2%
Applied egg-rr86.2%
associate--l+89.0%
+-inverses89.0%
metadata-eval89.0%
Simplified89.0%
Taylor expanded in t around inf 49.2%
if 0.99999996000000002 < (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) Initial program 97.4%
associate-+l+97.4%
+-commutative97.4%
+-commutative97.4%
+-commutative97.4%
Simplified97.4%
Taylor expanded in x around 0 97.4%
flip--97.4%
add-sqr-sqrt75.0%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
associate--l+98.4%
+-inverses98.4%
metadata-eval98.4%
+-commutative98.4%
Simplified98.4%
Final simplification72.1%
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 x)))
(t_2 (sqrt (+ 1.0 z)))
(t_3 (sqrt (+ y 1.0)))
(t_4 (- t_3 (sqrt y))))
(if (<= z 3.3e-22)
(+ (+ t_4 t_1) (+ (- (sqrt (+ 1.0 t)) (sqrt t)) (- 1.0 (sqrt z))))
(if (<= z 6.5e+104)
(+ (/ 1.0 (+ t_2 (sqrt z))) (+ t_1 (/ 1.0 (+ (sqrt y) t_3))))
(+ (- t_2 (sqrt z)) (+ t_4 (/ 1.0 (+ (sqrt (+ 1.0 x)) (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(x);
double t_2 = sqrt((1.0 + z));
double t_3 = sqrt((y + 1.0));
double t_4 = t_3 - sqrt(y);
double tmp;
if (z <= 3.3e-22) {
tmp = (t_4 + t_1) + ((sqrt((1.0 + t)) - sqrt(t)) + (1.0 - sqrt(z)));
} else if (z <= 6.5e+104) {
tmp = (1.0 / (t_2 + sqrt(z))) + (t_1 + (1.0 / (sqrt(y) + t_3)));
} else {
tmp = (t_2 - sqrt(z)) + (t_4 + (1.0 / (sqrt((1.0 + x)) + 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) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 1.0d0 - sqrt(x)
t_2 = sqrt((1.0d0 + z))
t_3 = sqrt((y + 1.0d0))
t_4 = t_3 - sqrt(y)
if (z <= 3.3d-22) then
tmp = (t_4 + t_1) + ((sqrt((1.0d0 + t)) - sqrt(t)) + (1.0d0 - sqrt(z)))
else if (z <= 6.5d+104) then
tmp = (1.0d0 / (t_2 + sqrt(z))) + (t_1 + (1.0d0 / (sqrt(y) + t_3)))
else
tmp = (t_2 - sqrt(z)) + (t_4 + (1.0d0 / (sqrt((1.0d0 + x)) + 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(x);
double t_2 = Math.sqrt((1.0 + z));
double t_3 = Math.sqrt((y + 1.0));
double t_4 = t_3 - Math.sqrt(y);
double tmp;
if (z <= 3.3e-22) {
tmp = (t_4 + t_1) + ((Math.sqrt((1.0 + t)) - Math.sqrt(t)) + (1.0 - Math.sqrt(z)));
} else if (z <= 6.5e+104) {
tmp = (1.0 / (t_2 + Math.sqrt(z))) + (t_1 + (1.0 / (Math.sqrt(y) + t_3)));
} else {
tmp = (t_2 - Math.sqrt(z)) + (t_4 + (1.0 / (Math.sqrt((1.0 + x)) + 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(x) t_2 = math.sqrt((1.0 + z)) t_3 = math.sqrt((y + 1.0)) t_4 = t_3 - math.sqrt(y) tmp = 0 if z <= 3.3e-22: tmp = (t_4 + t_1) + ((math.sqrt((1.0 + t)) - math.sqrt(t)) + (1.0 - math.sqrt(z))) elif z <= 6.5e+104: tmp = (1.0 / (t_2 + math.sqrt(z))) + (t_1 + (1.0 / (math.sqrt(y) + t_3))) else: tmp = (t_2 - math.sqrt(z)) + (t_4 + (1.0 / (math.sqrt((1.0 + x)) + 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 - sqrt(x)) t_2 = sqrt(Float64(1.0 + z)) t_3 = sqrt(Float64(y + 1.0)) t_4 = Float64(t_3 - sqrt(y)) tmp = 0.0 if (z <= 3.3e-22) tmp = Float64(Float64(t_4 + t_1) + Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(1.0 - sqrt(z)))); elseif (z <= 6.5e+104) tmp = Float64(Float64(1.0 / Float64(t_2 + sqrt(z))) + Float64(t_1 + Float64(1.0 / Float64(sqrt(y) + t_3)))); else tmp = Float64(Float64(t_2 - sqrt(z)) + Float64(t_4 + Float64(1.0 / Float64(sqrt(Float64(1.0 + x)) + 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(x);
t_2 = sqrt((1.0 + z));
t_3 = sqrt((y + 1.0));
t_4 = t_3 - sqrt(y);
tmp = 0.0;
if (z <= 3.3e-22)
tmp = (t_4 + t_1) + ((sqrt((1.0 + t)) - sqrt(t)) + (1.0 - sqrt(z)));
elseif (z <= 6.5e+104)
tmp = (1.0 / (t_2 + sqrt(z))) + (t_1 + (1.0 / (sqrt(y) + t_3)));
else
tmp = (t_2 - sqrt(z)) + (t_4 + (1.0 / (sqrt((1.0 + x)) + 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[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 3.3e-22], N[(N[(t$95$4 + t$95$1), $MachinePrecision] + N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(1.0 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+104], N[(N[(1.0 / N[(t$95$2 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(t$95$4 + N[(1.0 / N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := 1 - \sqrt{x}\\
t_2 := \sqrt{1 + z}\\
t_3 := \sqrt{y + 1}\\
t_4 := t\_3 - \sqrt{y}\\
\mathbf{if}\;z \leq 3.3 \cdot 10^{-22}:\\
\;\;\;\;\left(t\_4 + t\_1\right) + \left(\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(1 - \sqrt{z}\right)\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+104}:\\
\;\;\;\;\frac{1}{t\_2 + \sqrt{z}} + \left(t\_1 + \frac{1}{\sqrt{y} + t\_3}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_2 - \sqrt{z}\right) + \left(t\_4 + \frac{1}{\sqrt{1 + x} + \sqrt{x}}\right)\\
\end{array}
\end{array}
if z < 3.3000000000000001e-22Initial program 98.2%
associate-+l+98.2%
+-commutative98.2%
+-commutative98.2%
+-commutative98.2%
Simplified98.2%
Taylor expanded in x around 0 47.8%
Taylor expanded in z around 0 47.8%
if 3.3000000000000001e-22 < z < 6.5000000000000005e104Initial program 84.3%
associate-+l+84.3%
+-commutative84.3%
+-commutative84.3%
+-commutative84.3%
Simplified84.3%
Taylor expanded in x around 0 49.7%
flip--84.7%
add-sqr-sqrt69.4%
add-sqr-sqrt87.0%
Applied egg-rr51.0%
associate--l+92.0%
+-inverses92.0%
metadata-eval92.0%
+-commutative92.0%
Simplified51.9%
flip--51.9%
add-sqr-sqrt36.3%
add-sqr-sqrt51.9%
Applied egg-rr51.9%
associate--l+51.9%
+-inverses51.9%
metadata-eval51.9%
+-commutative51.9%
Simplified51.9%
Taylor expanded in t around inf 32.9%
if 6.5000000000000005e104 < z Initial program 84.7%
associate-+l+84.7%
+-commutative84.7%
+-commutative84.7%
+-commutative84.7%
Simplified84.7%
flip--84.7%
add-sqr-sqrt68.2%
+-commutative68.2%
add-sqr-sqrt85.7%
+-commutative85.7%
Applied egg-rr85.7%
associate--l+89.6%
+-inverses89.6%
metadata-eval89.6%
Simplified89.6%
Taylor expanded in t around inf 52.4%
Final simplification46.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 (+ 1.0 z))))
(if (<= y 3.15e-15)
(+
(+ (- (sqrt (+ 1.0 t)) (sqrt t)) (/ 1.0 (+ t_1 (sqrt z))))
(- (- 2.0 (sqrt y)) (sqrt x)))
(+
(- t_1 (sqrt z))
(+
(- (sqrt (+ y 1.0)) (sqrt y))
(/ 1.0 (+ (sqrt (+ 1.0 x)) (sqrt x))))))))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 tmp;
if (y <= 3.15e-15) {
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + (1.0 / (t_1 + sqrt(z)))) + ((2.0 - sqrt(y)) - sqrt(x));
} else {
tmp = (t_1 - sqrt(z)) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 / (sqrt((1.0 + x)) + 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 = sqrt((1.0d0 + z))
if (y <= 3.15d-15) then
tmp = ((sqrt((1.0d0 + t)) - sqrt(t)) + (1.0d0 / (t_1 + sqrt(z)))) + ((2.0d0 - sqrt(y)) - sqrt(x))
else
tmp = (t_1 - sqrt(z)) + ((sqrt((y + 1.0d0)) - sqrt(y)) + (1.0d0 / (sqrt((1.0d0 + x)) + 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 = Math.sqrt((1.0 + z));
double tmp;
if (y <= 3.15e-15) {
tmp = ((Math.sqrt((1.0 + t)) - Math.sqrt(t)) + (1.0 / (t_1 + Math.sqrt(z)))) + ((2.0 - Math.sqrt(y)) - Math.sqrt(x));
} else {
tmp = (t_1 - Math.sqrt(z)) + ((Math.sqrt((y + 1.0)) - Math.sqrt(y)) + (1.0 / (Math.sqrt((1.0 + x)) + Math.sqrt(x))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + z)) tmp = 0 if y <= 3.15e-15: tmp = ((math.sqrt((1.0 + t)) - math.sqrt(t)) + (1.0 / (t_1 + math.sqrt(z)))) + ((2.0 - math.sqrt(y)) - math.sqrt(x)) else: tmp = (t_1 - math.sqrt(z)) + ((math.sqrt((y + 1.0)) - math.sqrt(y)) + (1.0 / (math.sqrt((1.0 + x)) + math.sqrt(x)))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 + z)) tmp = 0.0 if (y <= 3.15e-15) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(1.0 / Float64(t_1 + sqrt(z)))) + Float64(Float64(2.0 - sqrt(y)) - sqrt(x))); else tmp = Float64(Float64(t_1 - sqrt(z)) + Float64(Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) + Float64(1.0 / Float64(sqrt(Float64(1.0 + x)) + 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 = sqrt((1.0 + z));
tmp = 0.0;
if (y <= 3.15e-15)
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + (1.0 / (t_1 + sqrt(z)))) + ((2.0 - sqrt(y)) - sqrt(x));
else
tmp = (t_1 - sqrt(z)) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 / (sqrt((1.0 + x)) + 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[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 3.15e-15], N[(N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$1 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[Sqrt[x], $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}\\
\mathbf{if}\;y \leq 3.15 \cdot 10^{-15}:\\
\;\;\;\;\left(\left(\sqrt{1 + t} - \sqrt{t}\right) + \frac{1}{t\_1 + \sqrt{z}}\right) + \left(\left(2 - \sqrt{y}\right) - \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \frac{1}{\sqrt{1 + x} + \sqrt{x}}\right)\\
\end{array}
\end{array}
if y < 3.14999999999999991e-15Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
+-commutative97.1%
+-commutative97.1%
Simplified97.1%
Taylor expanded in x around 0 54.3%
flip--97.3%
add-sqr-sqrt79.2%
add-sqr-sqrt98.0%
Applied egg-rr54.6%
associate--l+98.3%
+-inverses98.3%
metadata-eval98.3%
+-commutative98.3%
Simplified54.8%
Taylor expanded in y around 0 54.8%
+-commutative54.8%
associate--r+54.8%
Simplified54.8%
if 3.14999999999999991e-15 < y Initial program 86.1%
associate-+l+86.1%
+-commutative86.1%
+-commutative86.1%
+-commutative86.1%
Simplified86.1%
flip--86.2%
add-sqr-sqrt65.9%
+-commutative65.9%
add-sqr-sqrt86.8%
+-commutative86.8%
Applied egg-rr86.8%
associate--l+89.2%
+-inverses89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in t around inf 49.8%
Final simplification52.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 (<= y 6e+32)
(+
(/ 1.0 (+ (sqrt (+ 1.0 z)) (sqrt z)))
(+ (- 1.0 (sqrt x)) (/ 1.0 (+ (sqrt y) (sqrt (+ y 1.0))))))
(/ 1.0 (+ (sqrt (+ 1.0 x)) (sqrt x)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6e+32) {
tmp = (1.0 / (sqrt((1.0 + z)) + sqrt(z))) + ((1.0 - sqrt(x)) + (1.0 / (sqrt(y) + sqrt((y + 1.0)))));
} else {
tmp = 1.0 / (sqrt((1.0 + x)) + 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 <= 6d+32) then
tmp = (1.0d0 / (sqrt((1.0d0 + z)) + sqrt(z))) + ((1.0d0 - sqrt(x)) + (1.0d0 / (sqrt(y) + sqrt((y + 1.0d0)))))
else
tmp = 1.0d0 / (sqrt((1.0d0 + x)) + 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 <= 6e+32) {
tmp = (1.0 / (Math.sqrt((1.0 + z)) + Math.sqrt(z))) + ((1.0 - Math.sqrt(x)) + (1.0 / (Math.sqrt(y) + Math.sqrt((y + 1.0)))));
} else {
tmp = 1.0 / (Math.sqrt((1.0 + x)) + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 6e+32: tmp = (1.0 / (math.sqrt((1.0 + z)) + math.sqrt(z))) + ((1.0 - math.sqrt(x)) + (1.0 / (math.sqrt(y) + math.sqrt((y + 1.0))))) else: tmp = 1.0 / (math.sqrt((1.0 + x)) + 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 <= 6e+32) tmp = Float64(Float64(1.0 / Float64(sqrt(Float64(1.0 + z)) + sqrt(z))) + Float64(Float64(1.0 - sqrt(x)) + Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(y + 1.0)))))); else tmp = Float64(1.0 / Float64(sqrt(Float64(1.0 + x)) + 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 <= 6e+32)
tmp = (1.0 / (sqrt((1.0 + z)) + sqrt(z))) + ((1.0 - sqrt(x)) + (1.0 / (sqrt(y) + sqrt((y + 1.0)))));
else
tmp = 1.0 / (sqrt((1.0 + x)) + 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, 6e+32], N[(N[(1.0 / N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Sqrt[N[(1.0 + x), $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 6 \cdot 10^{+32}:\\
\;\;\;\;\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\left(1 - \sqrt{x}\right) + \frac{1}{\sqrt{y} + \sqrt{y + 1}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{1 + x} + \sqrt{x}}\\
\end{array}
\end{array}
if y < 6e32Initial program 95.7%
associate-+l+95.7%
+-commutative95.7%
+-commutative95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in x around 0 51.5%
flip--95.9%
add-sqr-sqrt77.3%
add-sqr-sqrt96.5%
Applied egg-rr51.8%
associate--l+96.7%
+-inverses96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified51.9%
flip--52.2%
add-sqr-sqrt51.3%
add-sqr-sqrt52.3%
Applied egg-rr52.3%
associate--l+52.4%
+-inverses52.4%
metadata-eval52.4%
+-commutative52.4%
Simplified52.4%
Taylor expanded in t around inf 32.2%
if 6e32 < y Initial program 86.2%
+-commutative86.2%
associate-+r+86.2%
associate-+r-44.8%
associate-+l-20.7%
associate-+r-3.2%
Simplified3.2%
Taylor expanded in t around inf 3.2%
associate--l+21.4%
+-commutative21.4%
+-commutative21.4%
+-commutative21.4%
associate-+l+21.4%
+-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 21.4%
mul-1-neg21.4%
Simplified21.4%
flip-+21.4%
add-sqr-sqrt22.2%
sqr-neg22.2%
add-sqr-sqrt21.8%
add-sqr-sqrt0.0%
sqrt-unprod19.0%
sqr-neg19.0%
add-sqr-sqrt19.0%
unsub-neg19.0%
add-sqr-sqrt0.0%
sqrt-unprod21.8%
sqr-neg21.8%
add-sqr-sqrt21.8%
Applied egg-rr21.8%
associate--l+25.8%
+-inverses25.8%
metadata-eval25.8%
+-commutative25.8%
Simplified25.8%
Final simplification29.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 6e+32)
(+
(/ 1.0 (+ (sqrt (+ 1.0 z)) (sqrt z)))
(+ (- (sqrt (+ y 1.0)) (sqrt y)) (- 1.0 (sqrt x))))
(/ 1.0 (+ (sqrt (+ 1.0 x)) (sqrt x)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6e+32) {
tmp = (1.0 / (sqrt((1.0 + z)) + sqrt(z))) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 - sqrt(x)));
} else {
tmp = 1.0 / (sqrt((1.0 + x)) + 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 <= 6d+32) then
tmp = (1.0d0 / (sqrt((1.0d0 + z)) + sqrt(z))) + ((sqrt((y + 1.0d0)) - sqrt(y)) + (1.0d0 - sqrt(x)))
else
tmp = 1.0d0 / (sqrt((1.0d0 + x)) + 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 <= 6e+32) {
tmp = (1.0 / (Math.sqrt((1.0 + z)) + Math.sqrt(z))) + ((Math.sqrt((y + 1.0)) - Math.sqrt(y)) + (1.0 - Math.sqrt(x)));
} else {
tmp = 1.0 / (Math.sqrt((1.0 + x)) + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 6e+32: tmp = (1.0 / (math.sqrt((1.0 + z)) + math.sqrt(z))) + ((math.sqrt((y + 1.0)) - math.sqrt(y)) + (1.0 - math.sqrt(x))) else: tmp = 1.0 / (math.sqrt((1.0 + x)) + 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 <= 6e+32) tmp = Float64(Float64(1.0 / Float64(sqrt(Float64(1.0 + z)) + sqrt(z))) + Float64(Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) + Float64(1.0 - sqrt(x)))); else tmp = Float64(1.0 / Float64(sqrt(Float64(1.0 + x)) + 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 <= 6e+32)
tmp = (1.0 / (sqrt((1.0 + z)) + sqrt(z))) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 - sqrt(x)));
else
tmp = 1.0 / (sqrt((1.0 + x)) + 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, 6e+32], N[(N[(1.0 / N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Sqrt[N[(1.0 + x), $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 6 \cdot 10^{+32}:\\
\;\;\;\;\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{1 + x} + \sqrt{x}}\\
\end{array}
\end{array}
if y < 6e32Initial program 95.7%
associate-+l+95.7%
+-commutative95.7%
+-commutative95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in x around 0 51.5%
flip--95.9%
add-sqr-sqrt77.3%
add-sqr-sqrt96.5%
Applied egg-rr51.8%
associate--l+96.7%
+-inverses96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified51.9%
Taylor expanded in t around inf 31.8%
if 6e32 < y Initial program 86.2%
+-commutative86.2%
associate-+r+86.2%
associate-+r-44.8%
associate-+l-20.7%
associate-+r-3.2%
Simplified3.2%
Taylor expanded in t around inf 3.2%
associate--l+21.4%
+-commutative21.4%
+-commutative21.4%
+-commutative21.4%
associate-+l+21.4%
+-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 21.4%
mul-1-neg21.4%
Simplified21.4%
flip-+21.4%
add-sqr-sqrt22.2%
sqr-neg22.2%
add-sqr-sqrt21.8%
add-sqr-sqrt0.0%
sqrt-unprod19.0%
sqr-neg19.0%
add-sqr-sqrt19.0%
unsub-neg19.0%
add-sqr-sqrt0.0%
sqrt-unprod21.8%
sqr-neg21.8%
add-sqr-sqrt21.8%
Applied egg-rr21.8%
associate--l+25.8%
+-inverses25.8%
metadata-eval25.8%
+-commutative25.8%
Simplified25.8%
Final simplification28.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 (<= y 5.5e+32)
(+
(- (sqrt (+ 1.0 z)) (sqrt z))
(+ (- (sqrt (+ y 1.0)) (sqrt y)) (- 1.0 (sqrt x))))
(/ 1.0 (+ (sqrt (+ 1.0 x)) (sqrt x)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 5.5e+32) {
tmp = (sqrt((1.0 + z)) - sqrt(z)) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 - sqrt(x)));
} else {
tmp = 1.0 / (sqrt((1.0 + x)) + 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 <= 5.5d+32) then
tmp = (sqrt((1.0d0 + z)) - sqrt(z)) + ((sqrt((y + 1.0d0)) - sqrt(y)) + (1.0d0 - sqrt(x)))
else
tmp = 1.0d0 / (sqrt((1.0d0 + x)) + 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 <= 5.5e+32) {
tmp = (Math.sqrt((1.0 + z)) - Math.sqrt(z)) + ((Math.sqrt((y + 1.0)) - Math.sqrt(y)) + (1.0 - Math.sqrt(x)));
} else {
tmp = 1.0 / (Math.sqrt((1.0 + x)) + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 5.5e+32: tmp = (math.sqrt((1.0 + z)) - math.sqrt(z)) + ((math.sqrt((y + 1.0)) - math.sqrt(y)) + (1.0 - math.sqrt(x))) else: tmp = 1.0 / (math.sqrt((1.0 + x)) + 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 <= 5.5e+32) tmp = Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) + Float64(1.0 - sqrt(x)))); else tmp = Float64(1.0 / Float64(sqrt(Float64(1.0 + x)) + 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 <= 5.5e+32)
tmp = (sqrt((1.0 + z)) - sqrt(z)) + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 - sqrt(x)));
else
tmp = 1.0 / (sqrt((1.0 + x)) + 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, 5.5e+32], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Sqrt[N[(1.0 + x), $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 5.5 \cdot 10^{+32}:\\
\;\;\;\;\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{1 + x} + \sqrt{x}}\\
\end{array}
\end{array}
if y < 5.49999999999999984e32Initial program 95.7%
associate-+l+95.7%
+-commutative95.7%
+-commutative95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in x around 0 51.5%
Taylor expanded in t around inf 31.4%
if 5.49999999999999984e32 < y Initial program 86.2%
+-commutative86.2%
associate-+r+86.2%
associate-+r-44.8%
associate-+l-20.7%
associate-+r-3.2%
Simplified3.2%
Taylor expanded in t around inf 3.2%
associate--l+21.4%
+-commutative21.4%
+-commutative21.4%
+-commutative21.4%
associate-+l+21.4%
+-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 21.4%
mul-1-neg21.4%
Simplified21.4%
flip-+21.4%
add-sqr-sqrt22.2%
sqr-neg22.2%
add-sqr-sqrt21.8%
add-sqr-sqrt0.0%
sqrt-unprod19.0%
sqr-neg19.0%
add-sqr-sqrt19.0%
unsub-neg19.0%
add-sqr-sqrt0.0%
sqrt-unprod21.8%
sqr-neg21.8%
add-sqr-sqrt21.8%
Applied egg-rr21.8%
associate--l+25.8%
+-inverses25.8%
metadata-eval25.8%
+-commutative25.8%
Simplified25.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
(if (<= y 8.8e-20)
(+ (- (sqrt (+ 1.0 z)) (sqrt z)) (- 2.0 (+ (sqrt y) (sqrt x))))
(if (<= y 2.2e+32)
(+
(+ (- (sqrt (+ y 1.0)) (sqrt y)) (- 1.0 (sqrt x)))
(* 0.5 (sqrt (/ 1.0 z))))
(/ 1.0 (+ (sqrt (+ 1.0 x)) (sqrt x))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 8.8e-20) {
tmp = (sqrt((1.0 + z)) - sqrt(z)) + (2.0 - (sqrt(y) + sqrt(x)));
} else if (y <= 2.2e+32) {
tmp = ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 - sqrt(x))) + (0.5 * sqrt((1.0 / z)));
} else {
tmp = 1.0 / (sqrt((1.0 + x)) + 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 <= 8.8d-20) then
tmp = (sqrt((1.0d0 + z)) - sqrt(z)) + (2.0d0 - (sqrt(y) + sqrt(x)))
else if (y <= 2.2d+32) then
tmp = ((sqrt((y + 1.0d0)) - sqrt(y)) + (1.0d0 - sqrt(x))) + (0.5d0 * sqrt((1.0d0 / z)))
else
tmp = 1.0d0 / (sqrt((1.0d0 + x)) + 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 <= 8.8e-20) {
tmp = (Math.sqrt((1.0 + z)) - Math.sqrt(z)) + (2.0 - (Math.sqrt(y) + Math.sqrt(x)));
} else if (y <= 2.2e+32) {
tmp = ((Math.sqrt((y + 1.0)) - Math.sqrt(y)) + (1.0 - Math.sqrt(x))) + (0.5 * Math.sqrt((1.0 / z)));
} else {
tmp = 1.0 / (Math.sqrt((1.0 + x)) + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 8.8e-20: tmp = (math.sqrt((1.0 + z)) - math.sqrt(z)) + (2.0 - (math.sqrt(y) + math.sqrt(x))) elif y <= 2.2e+32: tmp = ((math.sqrt((y + 1.0)) - math.sqrt(y)) + (1.0 - math.sqrt(x))) + (0.5 * math.sqrt((1.0 / z))) else: tmp = 1.0 / (math.sqrt((1.0 + x)) + 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 <= 8.8e-20) tmp = Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(2.0 - Float64(sqrt(y) + sqrt(x)))); elseif (y <= 2.2e+32) tmp = Float64(Float64(Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) + Float64(1.0 - sqrt(x))) + Float64(0.5 * sqrt(Float64(1.0 / z)))); else tmp = Float64(1.0 / Float64(sqrt(Float64(1.0 + x)) + 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 <= 8.8e-20)
tmp = (sqrt((1.0 + z)) - sqrt(z)) + (2.0 - (sqrt(y) + sqrt(x)));
elseif (y <= 2.2e+32)
tmp = ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 - sqrt(x))) + (0.5 * sqrt((1.0 / z)));
else
tmp = 1.0 / (sqrt((1.0 + x)) + 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, 8.8e-20], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(2.0 - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+32], N[(N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Sqrt[N[(1.0 + x), $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 8.8 \cdot 10^{-20}:\\
\;\;\;\;\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(2 - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+32}:\\
\;\;\;\;\left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 - \sqrt{x}\right)\right) + 0.5 \cdot \sqrt{\frac{1}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{1 + x} + \sqrt{x}}\\
\end{array}
\end{array}
if y < 8.79999999999999964e-20Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
+-commutative97.1%
+-commutative97.1%
Simplified97.1%
Taylor expanded in x around 0 54.8%
Taylor expanded in t around inf 33.2%
Taylor expanded in y around 0 33.2%
if 8.79999999999999964e-20 < y < 2.20000000000000001e32Initial program 86.1%
associate-+l+86.1%
+-commutative86.1%
+-commutative86.1%
+-commutative86.1%
Simplified86.1%
Taylor expanded in x around 0 28.2%
Taylor expanded in t around inf 18.7%
Taylor expanded in z around inf 9.2%
if 2.20000000000000001e32 < y Initial program 86.2%
+-commutative86.2%
associate-+r+86.2%
associate-+r-44.8%
associate-+l-20.7%
associate-+r-3.2%
Simplified3.2%
Taylor expanded in t around inf 3.2%
associate--l+21.4%
+-commutative21.4%
+-commutative21.4%
+-commutative21.4%
associate-+l+21.4%
+-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 21.4%
mul-1-neg21.4%
Simplified21.4%
flip-+21.4%
add-sqr-sqrt22.2%
sqr-neg22.2%
add-sqr-sqrt21.8%
add-sqr-sqrt0.0%
sqrt-unprod19.0%
sqr-neg19.0%
add-sqr-sqrt19.0%
unsub-neg19.0%
add-sqr-sqrt0.0%
sqrt-unprod21.8%
sqr-neg21.8%
add-sqr-sqrt21.8%
Applied egg-rr21.8%
associate--l+25.8%
+-inverses25.8%
metadata-eval25.8%
+-commutative25.8%
Simplified25.8%
Final simplification28.1%
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 x))))
(if (<= y 1.4)
(+
(/ 1.0 (+ (sqrt (+ 1.0 z)) (sqrt z)))
(+ (- 1.0 (sqrt x)) (- (+ 1.0 (* y 0.5)) (sqrt y))))
(if (<= y 2.5e+32)
(- (+ t_1 (* 0.5 (sqrt (/ 1.0 y)))) (sqrt x))
(/ 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 = sqrt((1.0 + x));
double tmp;
if (y <= 1.4) {
tmp = (1.0 / (sqrt((1.0 + z)) + sqrt(z))) + ((1.0 - sqrt(x)) + ((1.0 + (y * 0.5)) - sqrt(y)));
} else if (y <= 2.5e+32) {
tmp = (t_1 + (0.5 * sqrt((1.0 / y)))) - sqrt(x);
} 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 = sqrt((1.0d0 + x))
if (y <= 1.4d0) then
tmp = (1.0d0 / (sqrt((1.0d0 + z)) + sqrt(z))) + ((1.0d0 - sqrt(x)) + ((1.0d0 + (y * 0.5d0)) - sqrt(y)))
else if (y <= 2.5d+32) then
tmp = (t_1 + (0.5d0 * sqrt((1.0d0 / y)))) - sqrt(x)
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 = Math.sqrt((1.0 + x));
double tmp;
if (y <= 1.4) {
tmp = (1.0 / (Math.sqrt((1.0 + z)) + Math.sqrt(z))) + ((1.0 - Math.sqrt(x)) + ((1.0 + (y * 0.5)) - Math.sqrt(y)));
} else if (y <= 2.5e+32) {
tmp = (t_1 + (0.5 * Math.sqrt((1.0 / y)))) - Math.sqrt(x);
} 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 = math.sqrt((1.0 + x)) tmp = 0 if y <= 1.4: tmp = (1.0 / (math.sqrt((1.0 + z)) + math.sqrt(z))) + ((1.0 - math.sqrt(x)) + ((1.0 + (y * 0.5)) - math.sqrt(y))) elif y <= 2.5e+32: tmp = (t_1 + (0.5 * math.sqrt((1.0 / y)))) - math.sqrt(x) 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 = sqrt(Float64(1.0 + x)) tmp = 0.0 if (y <= 1.4) tmp = Float64(Float64(1.0 / Float64(sqrt(Float64(1.0 + z)) + sqrt(z))) + Float64(Float64(1.0 - sqrt(x)) + Float64(Float64(1.0 + Float64(y * 0.5)) - sqrt(y)))); elseif (y <= 2.5e+32) tmp = Float64(Float64(t_1 + Float64(0.5 * sqrt(Float64(1.0 / y)))) - sqrt(x)); 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 = sqrt((1.0 + x));
tmp = 0.0;
if (y <= 1.4)
tmp = (1.0 / (sqrt((1.0 + z)) + sqrt(z))) + ((1.0 - sqrt(x)) + ((1.0 + (y * 0.5)) - sqrt(y)));
elseif (y <= 2.5e+32)
tmp = (t_1 + (0.5 * sqrt((1.0 / y)))) - sqrt(x);
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[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 1.4], N[(N[(1.0 / N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 + N[(y * 0.5), $MachinePrecision]), $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+32], N[(N[(t$95$1 + N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $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 := \sqrt{1 + x}\\
\mathbf{if}\;y \leq 1.4:\\
\;\;\;\;\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(\left(1 - \sqrt{x}\right) + \left(\left(1 + y \cdot 0.5\right) - \sqrt{y}\right)\right)\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+32}:\\
\;\;\;\;\left(t\_1 + 0.5 \cdot \sqrt{\frac{1}{y}}\right) - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_1 + \sqrt{x}}\\
\end{array}
\end{array}
if y < 1.3999999999999999Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
+-commutative97.1%
+-commutative97.1%
Simplified97.1%
Taylor expanded in x around 0 53.4%
Taylor expanded in t around inf 32.4%
Taylor expanded in y around 0 32.4%
flip--97.3%
add-sqr-sqrt78.8%
add-sqr-sqrt98.0%
Applied egg-rr32.6%
associate--l+98.3%
+-inverses98.3%
metadata-eval98.3%
+-commutative98.3%
Simplified32.8%
if 1.3999999999999999 < y < 2.4999999999999999e32Initial program 82.9%
+-commutative82.9%
associate-+r+82.9%
associate-+r-80.2%
associate-+l-80.3%
associate-+r-80.3%
Simplified70.7%
Taylor expanded in t around inf 16.0%
associate--l+25.1%
+-commutative25.1%
+-commutative25.1%
+-commutative25.1%
associate-+l+25.1%
+-commutative25.1%
Simplified25.1%
Taylor expanded in z around inf 14.5%
Taylor expanded in y around inf 15.3%
if 2.4999999999999999e32 < y Initial program 86.2%
+-commutative86.2%
associate-+r+86.2%
associate-+r-44.8%
associate-+l-20.7%
associate-+r-3.2%
Simplified3.2%
Taylor expanded in t around inf 3.2%
associate--l+21.4%
+-commutative21.4%
+-commutative21.4%
+-commutative21.4%
associate-+l+21.4%
+-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 21.4%
mul-1-neg21.4%
Simplified21.4%
flip-+21.4%
add-sqr-sqrt22.2%
sqr-neg22.2%
add-sqr-sqrt21.8%
add-sqr-sqrt0.0%
sqrt-unprod19.0%
sqr-neg19.0%
add-sqr-sqrt19.0%
unsub-neg19.0%
add-sqr-sqrt0.0%
sqrt-unprod21.8%
sqr-neg21.8%
add-sqr-sqrt21.8%
Applied egg-rr21.8%
associate--l+25.8%
+-inverses25.8%
metadata-eval25.8%
+-commutative25.8%
Simplified25.8%
Final simplification28.4%
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 y) (sqrt x))) (t_2 (sqrt (+ 1.0 x))))
(if (<= y 1.75e-15)
(+ (- (sqrt (+ 1.0 z)) (sqrt z)) (- 2.0 t_1))
(if (<= y 4.6e+15)
(+ t_2 (- (sqrt (+ y 1.0)) t_1))
(/ 1.0 (+ t_2 (sqrt x)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt(y) + sqrt(x);
double t_2 = sqrt((1.0 + x));
double tmp;
if (y <= 1.75e-15) {
tmp = (sqrt((1.0 + z)) - sqrt(z)) + (2.0 - t_1);
} else if (y <= 4.6e+15) {
tmp = t_2 + (sqrt((y + 1.0)) - t_1);
} else {
tmp = 1.0 / (t_2 + 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) :: t_2
real(8) :: tmp
t_1 = sqrt(y) + sqrt(x)
t_2 = sqrt((1.0d0 + x))
if (y <= 1.75d-15) then
tmp = (sqrt((1.0d0 + z)) - sqrt(z)) + (2.0d0 - t_1)
else if (y <= 4.6d+15) then
tmp = t_2 + (sqrt((y + 1.0d0)) - t_1)
else
tmp = 1.0d0 / (t_2 + 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 = Math.sqrt(y) + Math.sqrt(x);
double t_2 = Math.sqrt((1.0 + x));
double tmp;
if (y <= 1.75e-15) {
tmp = (Math.sqrt((1.0 + z)) - Math.sqrt(z)) + (2.0 - t_1);
} else if (y <= 4.6e+15) {
tmp = t_2 + (Math.sqrt((y + 1.0)) - t_1);
} else {
tmp = 1.0 / (t_2 + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt(y) + math.sqrt(x) t_2 = math.sqrt((1.0 + x)) tmp = 0 if y <= 1.75e-15: tmp = (math.sqrt((1.0 + z)) - math.sqrt(z)) + (2.0 - t_1) elif y <= 4.6e+15: tmp = t_2 + (math.sqrt((y + 1.0)) - t_1) else: tmp = 1.0 / (t_2 + math.sqrt(x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(y) + sqrt(x)) t_2 = sqrt(Float64(1.0 + x)) tmp = 0.0 if (y <= 1.75e-15) tmp = Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(2.0 - t_1)); elseif (y <= 4.6e+15) tmp = Float64(t_2 + Float64(sqrt(Float64(y + 1.0)) - t_1)); else tmp = Float64(1.0 / Float64(t_2 + 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 = sqrt(y) + sqrt(x);
t_2 = sqrt((1.0 + x));
tmp = 0.0;
if (y <= 1.75e-15)
tmp = (sqrt((1.0 + z)) - sqrt(z)) + (2.0 - t_1);
elseif (y <= 4.6e+15)
tmp = t_2 + (sqrt((y + 1.0)) - t_1);
else
tmp = 1.0 / (t_2 + 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[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 1.75e-15], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(2.0 - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+15], N[(t$95$2 + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(t$95$2 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{y} + \sqrt{x}\\
t_2 := \sqrt{1 + x}\\
\mathbf{if}\;y \leq 1.75 \cdot 10^{-15}:\\
\;\;\;\;\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(2 - t\_1\right)\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+15}:\\
\;\;\;\;t\_2 + \left(\sqrt{y + 1} - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_2 + \sqrt{x}}\\
\end{array}
\end{array}
if y < 1.75e-15Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
+-commutative97.1%
+-commutative97.1%
Simplified97.1%
Taylor expanded in x around 0 54.3%
Taylor expanded in t around inf 33.0%
Taylor expanded in y around 0 33.0%
if 1.75e-15 < y < 4.6e15Initial program 82.1%
+-commutative82.1%
associate-+r+82.1%
associate-+r-82.1%
associate-+l-82.2%
associate-+r-82.2%
Simplified82.2%
Taylor expanded in t around inf 21.8%
associate--l+24.1%
+-commutative24.1%
+-commutative24.1%
+-commutative24.1%
associate-+l+24.1%
+-commutative24.1%
Simplified24.1%
Taylor expanded in z around inf 8.2%
if 4.6e15 < y Initial program 86.4%
+-commutative86.4%
associate-+r+86.4%
associate-+r-46.6%
associate-+l-23.6%
associate-+r-6.8%
Simplified5.9%
Taylor expanded in t around inf 3.2%
associate--l+21.4%
+-commutative21.4%
+-commutative21.4%
+-commutative21.4%
associate-+l+21.3%
+-commutative21.3%
Simplified21.3%
Taylor expanded in x around inf 21.3%
mul-1-neg21.3%
Simplified21.3%
flip-+21.3%
add-sqr-sqrt22.1%
sqr-neg22.1%
add-sqr-sqrt21.8%
add-sqr-sqrt0.0%
sqrt-unprod19.0%
sqr-neg19.0%
add-sqr-sqrt19.0%
unsub-neg19.0%
add-sqr-sqrt0.0%
sqrt-unprod21.8%
sqr-neg21.8%
add-sqr-sqrt21.8%
Applied egg-rr21.8%
associate--l+25.6%
+-inverses25.6%
metadata-eval25.6%
+-commutative25.6%
Simplified25.6%
Final simplification28.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 y) (sqrt x))))
(if (<= z 1.35)
(-
(+ 3.0 (+ (* y 0.5) (* z (+ 0.5 (* z (- (* z 0.0625) 0.125))))))
(+ (sqrt x) (+ (sqrt y) (sqrt z))))
(if (<= z 6.6e+28)
(+ 2.0 (- (* 0.5 (+ y (sqrt (/ 1.0 z)))) t_1))
(+ (sqrt (+ 1.0 x)) (- (sqrt (+ y 1.0)) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt(y) + sqrt(x);
double tmp;
if (z <= 1.35) {
tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * ((z * 0.0625) - 0.125)))))) - (sqrt(x) + (sqrt(y) + sqrt(z)));
} else if (z <= 6.6e+28) {
tmp = 2.0 + ((0.5 * (y + sqrt((1.0 / z)))) - t_1);
} else {
tmp = sqrt((1.0 + x)) + (sqrt((y + 1.0)) - t_1);
}
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(y) + sqrt(x)
if (z <= 1.35d0) then
tmp = (3.0d0 + ((y * 0.5d0) + (z * (0.5d0 + (z * ((z * 0.0625d0) - 0.125d0)))))) - (sqrt(x) + (sqrt(y) + sqrt(z)))
else if (z <= 6.6d+28) then
tmp = 2.0d0 + ((0.5d0 * (y + sqrt((1.0d0 / z)))) - t_1)
else
tmp = sqrt((1.0d0 + x)) + (sqrt((y + 1.0d0)) - t_1)
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(y) + Math.sqrt(x);
double tmp;
if (z <= 1.35) {
tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * ((z * 0.0625) - 0.125)))))) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)));
} else if (z <= 6.6e+28) {
tmp = 2.0 + ((0.5 * (y + Math.sqrt((1.0 / z)))) - t_1);
} else {
tmp = Math.sqrt((1.0 + x)) + (Math.sqrt((y + 1.0)) - t_1);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt(y) + math.sqrt(x) tmp = 0 if z <= 1.35: tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * ((z * 0.0625) - 0.125)))))) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))) elif z <= 6.6e+28: tmp = 2.0 + ((0.5 * (y + math.sqrt((1.0 / z)))) - t_1) else: tmp = math.sqrt((1.0 + x)) + (math.sqrt((y + 1.0)) - t_1) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(y) + sqrt(x)) tmp = 0.0 if (z <= 1.35) tmp = Float64(Float64(3.0 + Float64(Float64(y * 0.5) + Float64(z * Float64(0.5 + Float64(z * Float64(Float64(z * 0.0625) - 0.125)))))) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))); elseif (z <= 6.6e+28) tmp = Float64(2.0 + Float64(Float64(0.5 * Float64(y + sqrt(Float64(1.0 / z)))) - t_1)); else tmp = Float64(sqrt(Float64(1.0 + x)) + Float64(sqrt(Float64(y + 1.0)) - 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(y) + sqrt(x);
tmp = 0.0;
if (z <= 1.35)
tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * ((z * 0.0625) - 0.125)))))) - (sqrt(x) + (sqrt(y) + sqrt(z)));
elseif (z <= 6.6e+28)
tmp = 2.0 + ((0.5 * (y + sqrt((1.0 / z)))) - t_1);
else
tmp = sqrt((1.0 + x)) + (sqrt((y + 1.0)) - 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[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.35], N[(N[(3.0 + N[(N[(y * 0.5), $MachinePrecision] + N[(z * N[(0.5 + N[(z * N[(N[(z * 0.0625), $MachinePrecision] - 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+28], N[(2.0 + N[(N[(0.5 * N[(y + N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $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{y} + \sqrt{x}\\
\mathbf{if}\;z \leq 1.35:\\
\;\;\;\;\left(3 + \left(y \cdot 0.5 + z \cdot \left(0.5 + z \cdot \left(z \cdot 0.0625 - 0.125\right)\right)\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+28}:\\
\;\;\;\;2 + \left(0.5 \cdot \left(y + \sqrt{\frac{1}{z}}\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{1 + x} + \left(\sqrt{y + 1} - t\_1\right)\\
\end{array}
\end{array}
if z < 1.3500000000000001Initial program 98.0%
associate-+l+98.0%
+-commutative98.0%
+-commutative98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in x around 0 49.5%
Taylor expanded in t around inf 29.9%
Taylor expanded in y around 0 14.9%
Taylor expanded in z around 0 15.0%
if 1.3500000000000001 < z < 6.6e28Initial program 77.7%
associate-+l+77.7%
+-commutative77.7%
+-commutative77.7%
+-commutative77.7%
Simplified77.7%
Taylor expanded in x around 0 39.7%
Taylor expanded in t around inf 34.8%
Taylor expanded in y around 0 20.4%
Taylor expanded in z around inf 20.5%
associate--l+20.5%
distribute-lft-out20.5%
Simplified20.5%
if 6.6e28 < z Initial program 84.2%
+-commutative84.2%
associate-+r+84.2%
associate-+r-63.8%
associate-+l-50.5%
associate-+r-50.5%
Simplified28.6%
Taylor expanded in t around inf 3.2%
associate--l+23.0%
+-commutative23.0%
+-commutative23.0%
+-commutative23.0%
associate-+l+23.0%
+-commutative23.0%
Simplified23.0%
Taylor expanded in z around inf 34.4%
Final simplification23.4%
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 x))))
(if (<= y 1.15)
(+
(- (sqrt (+ 1.0 z)) (sqrt z))
(- (- (+ 2.0 (* y 0.5)) (sqrt x)) (sqrt y)))
(if (<= y 4e+32)
(- (+ t_1 (* 0.5 (sqrt (/ 1.0 y)))) (sqrt x))
(/ 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 = sqrt((1.0 + x));
double tmp;
if (y <= 1.15) {
tmp = (sqrt((1.0 + z)) - sqrt(z)) + (((2.0 + (y * 0.5)) - sqrt(x)) - sqrt(y));
} else if (y <= 4e+32) {
tmp = (t_1 + (0.5 * sqrt((1.0 / y)))) - sqrt(x);
} 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 = sqrt((1.0d0 + x))
if (y <= 1.15d0) then
tmp = (sqrt((1.0d0 + z)) - sqrt(z)) + (((2.0d0 + (y * 0.5d0)) - sqrt(x)) - sqrt(y))
else if (y <= 4d+32) then
tmp = (t_1 + (0.5d0 * sqrt((1.0d0 / y)))) - sqrt(x)
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 = Math.sqrt((1.0 + x));
double tmp;
if (y <= 1.15) {
tmp = (Math.sqrt((1.0 + z)) - Math.sqrt(z)) + (((2.0 + (y * 0.5)) - Math.sqrt(x)) - Math.sqrt(y));
} else if (y <= 4e+32) {
tmp = (t_1 + (0.5 * Math.sqrt((1.0 / y)))) - Math.sqrt(x);
} 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 = math.sqrt((1.0 + x)) tmp = 0 if y <= 1.15: tmp = (math.sqrt((1.0 + z)) - math.sqrt(z)) + (((2.0 + (y * 0.5)) - math.sqrt(x)) - math.sqrt(y)) elif y <= 4e+32: tmp = (t_1 + (0.5 * math.sqrt((1.0 / y)))) - math.sqrt(x) 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 = sqrt(Float64(1.0 + x)) tmp = 0.0 if (y <= 1.15) tmp = Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(Float64(Float64(2.0 + Float64(y * 0.5)) - sqrt(x)) - sqrt(y))); elseif (y <= 4e+32) tmp = Float64(Float64(t_1 + Float64(0.5 * sqrt(Float64(1.0 / y)))) - sqrt(x)); 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 = sqrt((1.0 + x));
tmp = 0.0;
if (y <= 1.15)
tmp = (sqrt((1.0 + z)) - sqrt(z)) + (((2.0 + (y * 0.5)) - sqrt(x)) - sqrt(y));
elseif (y <= 4e+32)
tmp = (t_1 + (0.5 * sqrt((1.0 / y)))) - sqrt(x);
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[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 1.15], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(2.0 + N[(y * 0.5), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+32], N[(N[(t$95$1 + N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $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 := \sqrt{1 + x}\\
\mathbf{if}\;y \leq 1.15:\\
\;\;\;\;\left(\sqrt{1 + z} - \sqrt{z}\right) + \left(\left(\left(2 + y \cdot 0.5\right) - \sqrt{x}\right) - \sqrt{y}\right)\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+32}:\\
\;\;\;\;\left(t\_1 + 0.5 \cdot \sqrt{\frac{1}{y}}\right) - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_1 + \sqrt{x}}\\
\end{array}
\end{array}
if y < 1.1499999999999999Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
+-commutative97.1%
+-commutative97.1%
Simplified97.1%
Taylor expanded in x around 0 53.4%
Taylor expanded in t around inf 32.4%
Taylor expanded in y around 0 32.4%
associate--r+32.4%
Simplified32.4%
if 1.1499999999999999 < y < 4.00000000000000021e32Initial program 82.9%
+-commutative82.9%
associate-+r+82.9%
associate-+r-80.2%
associate-+l-80.3%
associate-+r-80.3%
Simplified70.7%
Taylor expanded in t around inf 16.0%
associate--l+25.1%
+-commutative25.1%
+-commutative25.1%
+-commutative25.1%
associate-+l+25.1%
+-commutative25.1%
Simplified25.1%
Taylor expanded in z around inf 14.5%
Taylor expanded in y around inf 15.3%
if 4.00000000000000021e32 < y Initial program 86.2%
+-commutative86.2%
associate-+r+86.2%
associate-+r-44.8%
associate-+l-20.7%
associate-+r-3.2%
Simplified3.2%
Taylor expanded in t around inf 3.2%
associate--l+21.4%
+-commutative21.4%
+-commutative21.4%
+-commutative21.4%
associate-+l+21.4%
+-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 21.4%
mul-1-neg21.4%
Simplified21.4%
flip-+21.4%
add-sqr-sqrt22.2%
sqr-neg22.2%
add-sqr-sqrt21.8%
add-sqr-sqrt0.0%
sqrt-unprod19.0%
sqr-neg19.0%
add-sqr-sqrt19.0%
unsub-neg19.0%
add-sqr-sqrt0.0%
sqrt-unprod21.8%
sqr-neg21.8%
add-sqr-sqrt21.8%
Applied egg-rr21.8%
associate--l+25.8%
+-inverses25.8%
metadata-eval25.8%
+-commutative25.8%
Simplified25.8%
Final simplification28.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 y) (sqrt x))))
(if (<= z 1.35)
(-
(+ 3.0 (+ (* y 0.5) (* z (+ 0.5 (* z (- (* z 0.0625) 0.125))))))
(+ (sqrt x) (+ (sqrt y) (sqrt z))))
(if (<= z 6.6e+28)
(+ 2.0 (- (* 0.5 (+ y (sqrt (/ 1.0 z)))) t_1))
(+ 1.0 (- (sqrt (+ y 1.0)) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt(y) + sqrt(x);
double tmp;
if (z <= 1.35) {
tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * ((z * 0.0625) - 0.125)))))) - (sqrt(x) + (sqrt(y) + sqrt(z)));
} else if (z <= 6.6e+28) {
tmp = 2.0 + ((0.5 * (y + sqrt((1.0 / z)))) - t_1);
} else {
tmp = 1.0 + (sqrt((y + 1.0)) - t_1);
}
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(y) + sqrt(x)
if (z <= 1.35d0) then
tmp = (3.0d0 + ((y * 0.5d0) + (z * (0.5d0 + (z * ((z * 0.0625d0) - 0.125d0)))))) - (sqrt(x) + (sqrt(y) + sqrt(z)))
else if (z <= 6.6d+28) then
tmp = 2.0d0 + ((0.5d0 * (y + sqrt((1.0d0 / z)))) - t_1)
else
tmp = 1.0d0 + (sqrt((y + 1.0d0)) - t_1)
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(y) + Math.sqrt(x);
double tmp;
if (z <= 1.35) {
tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * ((z * 0.0625) - 0.125)))))) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)));
} else if (z <= 6.6e+28) {
tmp = 2.0 + ((0.5 * (y + Math.sqrt((1.0 / z)))) - t_1);
} else {
tmp = 1.0 + (Math.sqrt((y + 1.0)) - t_1);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt(y) + math.sqrt(x) tmp = 0 if z <= 1.35: tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * ((z * 0.0625) - 0.125)))))) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))) elif z <= 6.6e+28: tmp = 2.0 + ((0.5 * (y + math.sqrt((1.0 / z)))) - t_1) else: tmp = 1.0 + (math.sqrt((y + 1.0)) - t_1) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(y) + sqrt(x)) tmp = 0.0 if (z <= 1.35) tmp = Float64(Float64(3.0 + Float64(Float64(y * 0.5) + Float64(z * Float64(0.5 + Float64(z * Float64(Float64(z * 0.0625) - 0.125)))))) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))); elseif (z <= 6.6e+28) tmp = Float64(2.0 + Float64(Float64(0.5 * Float64(y + sqrt(Float64(1.0 / z)))) - t_1)); else tmp = Float64(1.0 + Float64(sqrt(Float64(y + 1.0)) - 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(y) + sqrt(x);
tmp = 0.0;
if (z <= 1.35)
tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * ((z * 0.0625) - 0.125)))))) - (sqrt(x) + (sqrt(y) + sqrt(z)));
elseif (z <= 6.6e+28)
tmp = 2.0 + ((0.5 * (y + sqrt((1.0 / z)))) - t_1);
else
tmp = 1.0 + (sqrt((y + 1.0)) - 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[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.35], N[(N[(3.0 + N[(N[(y * 0.5), $MachinePrecision] + N[(z * N[(0.5 + N[(z * N[(N[(z * 0.0625), $MachinePrecision] - 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+28], N[(2.0 + N[(N[(0.5 * N[(y + N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $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{y} + \sqrt{x}\\
\mathbf{if}\;z \leq 1.35:\\
\;\;\;\;\left(3 + \left(y \cdot 0.5 + z \cdot \left(0.5 + z \cdot \left(z \cdot 0.0625 - 0.125\right)\right)\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+28}:\\
\;\;\;\;2 + \left(0.5 \cdot \left(y + \sqrt{\frac{1}{z}}\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\sqrt{y + 1} - t\_1\right)\\
\end{array}
\end{array}
if z < 1.3500000000000001Initial program 98.0%
associate-+l+98.0%
+-commutative98.0%
+-commutative98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in x around 0 49.5%
Taylor expanded in t around inf 29.9%
Taylor expanded in y around 0 14.9%
Taylor expanded in z around 0 15.0%
if 1.3500000000000001 < z < 6.6e28Initial program 77.7%
associate-+l+77.7%
+-commutative77.7%
+-commutative77.7%
+-commutative77.7%
Simplified77.7%
Taylor expanded in x around 0 39.7%
Taylor expanded in t around inf 34.8%
Taylor expanded in y around 0 20.4%
Taylor expanded in z around inf 20.5%
associate--l+20.5%
distribute-lft-out20.5%
Simplified20.5%
if 6.6e28 < z Initial program 84.2%
+-commutative84.2%
associate-+r+84.2%
associate-+r-63.8%
associate-+l-50.5%
associate-+r-50.5%
Simplified28.6%
Taylor expanded in t around inf 3.2%
associate--l+23.0%
+-commutative23.0%
+-commutative23.0%
+-commutative23.0%
associate-+l+23.0%
+-commutative23.0%
Simplified23.0%
Taylor expanded in z around inf 34.4%
Taylor expanded in x around 0 19.3%
associate--l+37.4%
Simplified37.4%
Final simplification24.7%
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 y) (sqrt x))))
(if (<= z 1.25)
(-
(+ 3.0 (+ (* y 0.5) (* z (+ 0.5 (* z -0.125)))))
(+ (sqrt x) (+ (sqrt y) (sqrt z))))
(if (<= z 6.6e+28)
(+ 2.0 (- (* 0.5 (+ y (sqrt (/ 1.0 z)))) t_1))
(+ 1.0 (- (sqrt (+ y 1.0)) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt(y) + sqrt(x);
double tmp;
if (z <= 1.25) {
tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * -0.125))))) - (sqrt(x) + (sqrt(y) + sqrt(z)));
} else if (z <= 6.6e+28) {
tmp = 2.0 + ((0.5 * (y + sqrt((1.0 / z)))) - t_1);
} else {
tmp = 1.0 + (sqrt((y + 1.0)) - t_1);
}
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(y) + sqrt(x)
if (z <= 1.25d0) then
tmp = (3.0d0 + ((y * 0.5d0) + (z * (0.5d0 + (z * (-0.125d0)))))) - (sqrt(x) + (sqrt(y) + sqrt(z)))
else if (z <= 6.6d+28) then
tmp = 2.0d0 + ((0.5d0 * (y + sqrt((1.0d0 / z)))) - t_1)
else
tmp = 1.0d0 + (sqrt((y + 1.0d0)) - t_1)
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(y) + Math.sqrt(x);
double tmp;
if (z <= 1.25) {
tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * -0.125))))) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)));
} else if (z <= 6.6e+28) {
tmp = 2.0 + ((0.5 * (y + Math.sqrt((1.0 / z)))) - t_1);
} else {
tmp = 1.0 + (Math.sqrt((y + 1.0)) - t_1);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt(y) + math.sqrt(x) tmp = 0 if z <= 1.25: tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * -0.125))))) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))) elif z <= 6.6e+28: tmp = 2.0 + ((0.5 * (y + math.sqrt((1.0 / z)))) - t_1) else: tmp = 1.0 + (math.sqrt((y + 1.0)) - t_1) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(y) + sqrt(x)) tmp = 0.0 if (z <= 1.25) tmp = Float64(Float64(3.0 + Float64(Float64(y * 0.5) + Float64(z * Float64(0.5 + Float64(z * -0.125))))) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))); elseif (z <= 6.6e+28) tmp = Float64(2.0 + Float64(Float64(0.5 * Float64(y + sqrt(Float64(1.0 / z)))) - t_1)); else tmp = Float64(1.0 + Float64(sqrt(Float64(y + 1.0)) - 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(y) + sqrt(x);
tmp = 0.0;
if (z <= 1.25)
tmp = (3.0 + ((y * 0.5) + (z * (0.5 + (z * -0.125))))) - (sqrt(x) + (sqrt(y) + sqrt(z)));
elseif (z <= 6.6e+28)
tmp = 2.0 + ((0.5 * (y + sqrt((1.0 / z)))) - t_1);
else
tmp = 1.0 + (sqrt((y + 1.0)) - 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[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.25], N[(N[(3.0 + N[(N[(y * 0.5), $MachinePrecision] + N[(z * N[(0.5 + N[(z * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+28], N[(2.0 + N[(N[(0.5 * N[(y + N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $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{y} + \sqrt{x}\\
\mathbf{if}\;z \leq 1.25:\\
\;\;\;\;\left(3 + \left(y \cdot 0.5 + z \cdot \left(0.5 + z \cdot -0.125\right)\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+28}:\\
\;\;\;\;2 + \left(0.5 \cdot \left(y + \sqrt{\frac{1}{z}}\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\sqrt{y + 1} - t\_1\right)\\
\end{array}
\end{array}
if z < 1.25Initial program 98.0%
associate-+l+98.0%
+-commutative98.0%
+-commutative98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in x around 0 49.5%
Taylor expanded in t around inf 29.9%
Taylor expanded in y around 0 14.9%
Taylor expanded in z around 0 15.0%
if 1.25 < z < 6.6e28Initial program 77.7%
associate-+l+77.7%
+-commutative77.7%
+-commutative77.7%
+-commutative77.7%
Simplified77.7%
Taylor expanded in x around 0 39.7%
Taylor expanded in t around inf 34.8%
Taylor expanded in y around 0 20.4%
Taylor expanded in z around inf 20.5%
associate--l+20.5%
distribute-lft-out20.5%
Simplified20.5%
if 6.6e28 < z Initial program 84.2%
+-commutative84.2%
associate-+r+84.2%
associate-+r-63.8%
associate-+l-50.5%
associate-+r-50.5%
Simplified28.6%
Taylor expanded in t around inf 3.2%
associate--l+23.0%
+-commutative23.0%
+-commutative23.0%
+-commutative23.0%
associate-+l+23.0%
+-commutative23.0%
Simplified23.0%
Taylor expanded in z around inf 34.4%
Taylor expanded in x around 0 19.3%
associate--l+37.4%
Simplified37.4%
Final simplification24.7%
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 y) (sqrt x))))
(if (<= z 1.0)
(+ 3.0 (- (* 0.5 (+ y z)) (+ (sqrt x) (+ (sqrt y) (sqrt z)))))
(if (<= z 6.6e+28)
(+ 2.0 (- (* 0.5 (+ y (sqrt (/ 1.0 z)))) t_1))
(+ 1.0 (- (sqrt (+ y 1.0)) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt(y) + sqrt(x);
double tmp;
if (z <= 1.0) {
tmp = 3.0 + ((0.5 * (y + z)) - (sqrt(x) + (sqrt(y) + sqrt(z))));
} else if (z <= 6.6e+28) {
tmp = 2.0 + ((0.5 * (y + sqrt((1.0 / z)))) - t_1);
} else {
tmp = 1.0 + (sqrt((y + 1.0)) - t_1);
}
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(y) + sqrt(x)
if (z <= 1.0d0) then
tmp = 3.0d0 + ((0.5d0 * (y + z)) - (sqrt(x) + (sqrt(y) + sqrt(z))))
else if (z <= 6.6d+28) then
tmp = 2.0d0 + ((0.5d0 * (y + sqrt((1.0d0 / z)))) - t_1)
else
tmp = 1.0d0 + (sqrt((y + 1.0d0)) - t_1)
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(y) + Math.sqrt(x);
double tmp;
if (z <= 1.0) {
tmp = 3.0 + ((0.5 * (y + z)) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z))));
} else if (z <= 6.6e+28) {
tmp = 2.0 + ((0.5 * (y + Math.sqrt((1.0 / z)))) - t_1);
} else {
tmp = 1.0 + (Math.sqrt((y + 1.0)) - t_1);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt(y) + math.sqrt(x) tmp = 0 if z <= 1.0: tmp = 3.0 + ((0.5 * (y + z)) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z)))) elif z <= 6.6e+28: tmp = 2.0 + ((0.5 * (y + math.sqrt((1.0 / z)))) - t_1) else: tmp = 1.0 + (math.sqrt((y + 1.0)) - t_1) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(y) + sqrt(x)) tmp = 0.0 if (z <= 1.0) tmp = Float64(3.0 + Float64(Float64(0.5 * Float64(y + z)) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z))))); elseif (z <= 6.6e+28) tmp = Float64(2.0 + Float64(Float64(0.5 * Float64(y + sqrt(Float64(1.0 / z)))) - t_1)); else tmp = Float64(1.0 + Float64(sqrt(Float64(y + 1.0)) - 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(y) + sqrt(x);
tmp = 0.0;
if (z <= 1.0)
tmp = 3.0 + ((0.5 * (y + z)) - (sqrt(x) + (sqrt(y) + sqrt(z))));
elseif (z <= 6.6e+28)
tmp = 2.0 + ((0.5 * (y + sqrt((1.0 / z)))) - t_1);
else
tmp = 1.0 + (sqrt((y + 1.0)) - 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[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.0], N[(3.0 + N[(N[(0.5 * N[(y + z), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+28], N[(2.0 + N[(N[(0.5 * N[(y + N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $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{y} + \sqrt{x}\\
\mathbf{if}\;z \leq 1:\\
\;\;\;\;3 + \left(0.5 \cdot \left(y + z\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+28}:\\
\;\;\;\;2 + \left(0.5 \cdot \left(y + \sqrt{\frac{1}{z}}\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\sqrt{y + 1} - t\_1\right)\\
\end{array}
\end{array}
if z < 1Initial program 98.0%
associate-+l+98.0%
+-commutative98.0%
+-commutative98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in x around 0 49.5%
Taylor expanded in t around inf 29.9%
Taylor expanded in y around 0 14.9%
Taylor expanded in z around 0 15.0%
associate--l+15.0%
distribute-lft-out15.0%
Simplified15.0%
if 1 < z < 6.6e28Initial program 77.7%
associate-+l+77.7%
+-commutative77.7%
+-commutative77.7%
+-commutative77.7%
Simplified77.7%
Taylor expanded in x around 0 39.7%
Taylor expanded in t around inf 34.8%
Taylor expanded in y around 0 20.4%
Taylor expanded in z around inf 20.5%
associate--l+20.5%
distribute-lft-out20.5%
Simplified20.5%
if 6.6e28 < z Initial program 84.2%
+-commutative84.2%
associate-+r+84.2%
associate-+r-63.8%
associate-+l-50.5%
associate-+r-50.5%
Simplified28.6%
Taylor expanded in t around inf 3.2%
associate--l+23.0%
+-commutative23.0%
+-commutative23.0%
+-commutative23.0%
associate-+l+23.0%
+-commutative23.0%
Simplified23.0%
Taylor expanded in z around inf 34.4%
Taylor expanded in x around 0 19.3%
associate--l+37.4%
Simplified37.4%
Final simplification24.7%
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 y) (sqrt x))))
(if (<= z 0.45)
(- (+ (* y 0.5) 3.0) (+ (sqrt x) (+ (sqrt y) (sqrt z))))
(if (<= z 6.6e+28)
(+ 2.0 (- (* 0.5 (+ y (sqrt (/ 1.0 z)))) t_1))
(+ 1.0 (- (sqrt (+ y 1.0)) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt(y) + sqrt(x);
double tmp;
if (z <= 0.45) {
tmp = ((y * 0.5) + 3.0) - (sqrt(x) + (sqrt(y) + sqrt(z)));
} else if (z <= 6.6e+28) {
tmp = 2.0 + ((0.5 * (y + sqrt((1.0 / z)))) - t_1);
} else {
tmp = 1.0 + (sqrt((y + 1.0)) - t_1);
}
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(y) + sqrt(x)
if (z <= 0.45d0) then
tmp = ((y * 0.5d0) + 3.0d0) - (sqrt(x) + (sqrt(y) + sqrt(z)))
else if (z <= 6.6d+28) then
tmp = 2.0d0 + ((0.5d0 * (y + sqrt((1.0d0 / z)))) - t_1)
else
tmp = 1.0d0 + (sqrt((y + 1.0d0)) - t_1)
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(y) + Math.sqrt(x);
double tmp;
if (z <= 0.45) {
tmp = ((y * 0.5) + 3.0) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)));
} else if (z <= 6.6e+28) {
tmp = 2.0 + ((0.5 * (y + Math.sqrt((1.0 / z)))) - t_1);
} else {
tmp = 1.0 + (Math.sqrt((y + 1.0)) - t_1);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt(y) + math.sqrt(x) tmp = 0 if z <= 0.45: tmp = ((y * 0.5) + 3.0) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))) elif z <= 6.6e+28: tmp = 2.0 + ((0.5 * (y + math.sqrt((1.0 / z)))) - t_1) else: tmp = 1.0 + (math.sqrt((y + 1.0)) - t_1) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(y) + sqrt(x)) tmp = 0.0 if (z <= 0.45) tmp = Float64(Float64(Float64(y * 0.5) + 3.0) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))); elseif (z <= 6.6e+28) tmp = Float64(2.0 + Float64(Float64(0.5 * Float64(y + sqrt(Float64(1.0 / z)))) - t_1)); else tmp = Float64(1.0 + Float64(sqrt(Float64(y + 1.0)) - 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(y) + sqrt(x);
tmp = 0.0;
if (z <= 0.45)
tmp = ((y * 0.5) + 3.0) - (sqrt(x) + (sqrt(y) + sqrt(z)));
elseif (z <= 6.6e+28)
tmp = 2.0 + ((0.5 * (y + sqrt((1.0 / z)))) - t_1);
else
tmp = 1.0 + (sqrt((y + 1.0)) - 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[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 0.45], N[(N[(N[(y * 0.5), $MachinePrecision] + 3.0), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+28], N[(2.0 + N[(N[(0.5 * N[(y + N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $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{y} + \sqrt{x}\\
\mathbf{if}\;z \leq 0.45:\\
\;\;\;\;\left(y \cdot 0.5 + 3\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+28}:\\
\;\;\;\;2 + \left(0.5 \cdot \left(y + \sqrt{\frac{1}{z}}\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\sqrt{y + 1} - t\_1\right)\\
\end{array}
\end{array}
if z < 0.450000000000000011Initial program 98.0%
associate-+l+98.0%
+-commutative98.0%
+-commutative98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in x around 0 49.1%
Taylor expanded in t around inf 30.0%
Taylor expanded in y around 0 15.0%
Taylor expanded in z around 0 15.0%
if 0.450000000000000011 < z < 6.6e28Initial program 79.1%
associate-+l+79.1%
+-commutative79.1%
+-commutative79.1%
+-commutative79.1%
Simplified79.1%
Taylor expanded in x around 0 43.5%
Taylor expanded in t around inf 33.9%
Taylor expanded in y around 0 19.5%
Taylor expanded in z around inf 19.6%
associate--l+19.6%
distribute-lft-out19.6%
Simplified19.6%
if 6.6e28 < z Initial program 84.2%
+-commutative84.2%
associate-+r+84.2%
associate-+r-63.8%
associate-+l-50.5%
associate-+r-50.5%
Simplified28.6%
Taylor expanded in t around inf 3.2%
associate--l+23.0%
+-commutative23.0%
+-commutative23.0%
+-commutative23.0%
associate-+l+23.0%
+-commutative23.0%
Simplified23.0%
Taylor expanded in z around inf 34.4%
Taylor expanded in x around 0 19.3%
associate--l+37.4%
Simplified37.4%
Final simplification24.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 (<= z 0.55) (- (+ (* y 0.5) 3.0) (+ (sqrt x) (+ (sqrt y) (sqrt z)))) (+ 1.0 (- (sqrt (+ y 1.0)) (+ (sqrt y) (sqrt x))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 0.55) {
tmp = ((y * 0.5) + 3.0) - (sqrt(x) + (sqrt(y) + sqrt(z)));
} else {
tmp = 1.0 + (sqrt((y + 1.0)) - (sqrt(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 <= 0.55d0) then
tmp = ((y * 0.5d0) + 3.0d0) - (sqrt(x) + (sqrt(y) + sqrt(z)))
else
tmp = 1.0d0 + (sqrt((y + 1.0d0)) - (sqrt(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 <= 0.55) {
tmp = ((y * 0.5) + 3.0) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)));
} else {
tmp = 1.0 + (Math.sqrt((y + 1.0)) - (Math.sqrt(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 <= 0.55: tmp = ((y * 0.5) + 3.0) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))) else: tmp = 1.0 + (math.sqrt((y + 1.0)) - (math.sqrt(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 <= 0.55) tmp = Float64(Float64(Float64(y * 0.5) + 3.0) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))); else tmp = Float64(1.0 + Float64(sqrt(Float64(y + 1.0)) - Float64(sqrt(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 <= 0.55)
tmp = ((y * 0.5) + 3.0) - (sqrt(x) + (sqrt(y) + sqrt(z)));
else
tmp = 1.0 + (sqrt((y + 1.0)) - (sqrt(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, 0.55], N[(N[(N[(y * 0.5), $MachinePrecision] + 3.0), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + 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 0.55:\\
\;\;\;\;\left(y \cdot 0.5 + 3\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\end{array}
\end{array}
if z < 0.55000000000000004Initial program 98.0%
associate-+l+98.0%
+-commutative98.0%
+-commutative98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in x around 0 49.5%
Taylor expanded in t around inf 29.9%
Taylor expanded in y around 0 14.9%
Taylor expanded in z around 0 15.0%
if 0.55000000000000004 < z Initial program 83.4%
+-commutative83.4%
associate-+r+83.4%
associate-+r-63.5%
associate-+l-50.9%
associate-+r-50.7%
Simplified31.5%
Taylor expanded in t around inf 5.3%
associate--l+24.0%
+-commutative24.0%
+-commutative24.0%
+-commutative24.0%
associate-+l+24.0%
+-commutative24.0%
Simplified24.0%
Taylor expanded in z around inf 33.2%
Taylor expanded in x around 0 18.6%
associate--l+35.9%
Simplified35.9%
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 (<= x 1.6e-19) (+ 1.0 (- (sqrt (+ y 1.0)) (+ (sqrt y) (sqrt x)))) (/ 1.0 (+ (sqrt (+ 1.0 x)) (sqrt x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.6e-19) {
tmp = 1.0 + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)));
} else {
tmp = 1.0 / (sqrt((1.0 + x)) + 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 (x <= 1.6d-19) then
tmp = 1.0d0 + (sqrt((y + 1.0d0)) - (sqrt(y) + sqrt(x)))
else
tmp = 1.0d0 / (sqrt((1.0d0 + x)) + 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 (x <= 1.6e-19) {
tmp = 1.0 + (Math.sqrt((y + 1.0)) - (Math.sqrt(y) + Math.sqrt(x)));
} else {
tmp = 1.0 / (Math.sqrt((1.0 + x)) + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 1.6e-19: tmp = 1.0 + (math.sqrt((y + 1.0)) - (math.sqrt(y) + math.sqrt(x))) else: tmp = 1.0 / (math.sqrt((1.0 + x)) + math.sqrt(x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 1.6e-19) tmp = Float64(1.0 + Float64(sqrt(Float64(y + 1.0)) - Float64(sqrt(y) + sqrt(x)))); else tmp = Float64(1.0 / Float64(sqrt(Float64(1.0 + x)) + 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 (x <= 1.6e-19)
tmp = 1.0 + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)));
else
tmp = 1.0 / (sqrt((1.0 + x)) + 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[x, 1.6e-19], N[(1.0 + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Sqrt[N[(1.0 + x), $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}\;x \leq 1.6 \cdot 10^{-19}:\\
\;\;\;\;1 + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{1 + x} + \sqrt{x}}\\
\end{array}
\end{array}
if x < 1.59999999999999991e-19Initial program 97.4%
+-commutative97.4%
associate-+r+97.4%
associate-+r-60.0%
associate-+l-58.8%
associate-+r-54.9%
Simplified36.6%
Taylor expanded in t around inf 19.5%
associate--l+40.7%
+-commutative40.7%
+-commutative40.7%
+-commutative40.7%
associate-+l+40.7%
+-commutative40.7%
Simplified40.7%
Taylor expanded in z around inf 40.0%
Taylor expanded in x around 0 22.9%
associate--l+40.0%
Simplified40.0%
if 1.59999999999999991e-19 < x Initial program 85.7%
+-commutative85.7%
associate-+r+85.7%
associate-+r-79.4%
associate-+l-58.6%
associate-+r-46.0%
Simplified44.5%
Taylor expanded in t around inf 5.6%
associate--l+8.4%
+-commutative8.4%
+-commutative8.4%
+-commutative8.4%
associate-+l+8.4%
+-commutative8.4%
Simplified8.4%
Taylor expanded in x around inf 5.5%
mul-1-neg5.5%
Simplified5.5%
flip-+5.5%
add-sqr-sqrt6.4%
sqr-neg6.4%
add-sqr-sqrt6.0%
add-sqr-sqrt0.0%
sqrt-unprod2.2%
sqr-neg2.2%
add-sqr-sqrt2.2%
unsub-neg2.2%
add-sqr-sqrt0.0%
sqrt-unprod6.0%
sqr-neg6.0%
add-sqr-sqrt6.0%
Applied egg-rr6.0%
associate--l+11.0%
+-inverses11.0%
metadata-eval11.0%
+-commutative11.0%
Simplified11.0%
Final simplification24.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 (<= x 63000000.0) (- (sqrt (+ 1.0 x)) (sqrt x)) (* 0.5 (sqrt (/ 1.0 x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 63000000.0) {
tmp = sqrt((1.0 + x)) - sqrt(x);
} else {
tmp = 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) :: tmp
if (x <= 63000000.0d0) then
tmp = sqrt((1.0d0 + x)) - sqrt(x)
else
tmp = 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 tmp;
if (x <= 63000000.0) {
tmp = Math.sqrt((1.0 + x)) - Math.sqrt(x);
} else {
tmp = 0.5 * Math.sqrt((1.0 / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 63000000.0: tmp = math.sqrt((1.0 + x)) - math.sqrt(x) else: tmp = 0.5 * math.sqrt((1.0 / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 63000000.0) tmp = Float64(sqrt(Float64(1.0 + x)) - sqrt(x)); else tmp = 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)
tmp = 0.0;
if (x <= 63000000.0)
tmp = sqrt((1.0 + x)) - sqrt(x);
else
tmp = 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_] := If[LessEqual[x, 63000000.0], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 63000000:\\
\;\;\;\;\sqrt{1 + x} - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 6.3e7Initial program 97.5%
+-commutative97.5%
associate-+r+97.5%
associate-+r-58.0%
associate-+l-56.7%
associate-+r-52.4%
Simplified34.3%
Taylor expanded in t around inf 18.6%
associate--l+39.3%
+-commutative39.3%
+-commutative39.3%
+-commutative39.3%
associate-+l+39.3%
+-commutative39.3%
Simplified39.3%
Taylor expanded in x around inf 28.7%
mul-1-neg28.7%
Simplified28.7%
unsub-neg28.7%
Applied egg-rr28.7%
if 6.3e7 < x Initial program 84.3%
+-commutative84.3%
associate-+r+84.3%
associate-+r-83.5%
associate-+l-60.7%
associate-+r-47.6%
Simplified47.6%
Taylor expanded in t around inf 5.0%
associate--l+6.5%
+-commutative6.5%
+-commutative6.5%
+-commutative6.5%
associate-+l+6.5%
+-commutative6.5%
Simplified6.5%
Taylor expanded in x around inf 3.6%
mul-1-neg3.6%
Simplified3.6%
Taylor expanded in x around inf 9.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 (+ 1.0 x)) (sqrt x))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 / (sqrt((1.0 + x)) + 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((1.0d0 + x)) + 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((1.0 + x)) + Math.sqrt(x));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 / (math.sqrt((1.0 + x)) + math.sqrt(x))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 / Float64(sqrt(Float64(1.0 + x)) + sqrt(x))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 / (sqrt((1.0 + x)) + 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[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{1}{\sqrt{1 + x} + \sqrt{x}}
\end{array}
Initial program 91.0%
+-commutative91.0%
associate-+r+91.0%
associate-+r-70.5%
associate-+l-58.7%
associate-+r-50.0%
Simplified40.9%
Taylor expanded in t around inf 11.9%
associate--l+23.2%
+-commutative23.2%
+-commutative23.2%
+-commutative23.2%
associate-+l+23.2%
+-commutative23.2%
Simplified23.2%
Taylor expanded in x around inf 16.3%
mul-1-neg16.3%
Simplified16.3%
flip-+16.3%
add-sqr-sqrt16.8%
sqr-neg16.8%
add-sqr-sqrt16.6%
add-sqr-sqrt0.0%
sqrt-unprod14.4%
sqr-neg14.4%
add-sqr-sqrt14.4%
unsub-neg14.4%
add-sqr-sqrt0.0%
sqrt-unprod16.6%
sqr-neg16.6%
add-sqr-sqrt16.6%
Applied egg-rr16.6%
associate--l+19.3%
+-inverses19.3%
metadata-eval19.3%
+-commutative19.3%
Simplified19.3%
Final simplification19.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 (<= x 4.6) (- (+ 1.0 (* x (+ 0.5 (* x (- (* x 0.0625) 0.125))))) (sqrt x)) (* 0.5 (sqrt (/ 1.0 x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 4.6) {
tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - sqrt(x);
} else {
tmp = 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) :: tmp
if (x <= 4.6d0) then
tmp = (1.0d0 + (x * (0.5d0 + (x * ((x * 0.0625d0) - 0.125d0))))) - sqrt(x)
else
tmp = 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 tmp;
if (x <= 4.6) {
tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - Math.sqrt(x);
} else {
tmp = 0.5 * Math.sqrt((1.0 / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 4.6: tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - math.sqrt(x) else: tmp = 0.5 * math.sqrt((1.0 / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 4.6) tmp = Float64(Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * Float64(Float64(x * 0.0625) - 0.125))))) - sqrt(x)); else tmp = 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)
tmp = 0.0;
if (x <= 4.6)
tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - sqrt(x);
else
tmp = 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_] := If[LessEqual[x, 4.6], N[(N[(1.0 + N[(x * N[(0.5 + N[(x * N[(N[(x * 0.0625), $MachinePrecision] - 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.6:\\
\;\;\;\;\left(1 + x \cdot \left(0.5 + x \cdot \left(x \cdot 0.0625 - 0.125\right)\right)\right) - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 4.5999999999999996Initial program 97.5%
+-commutative97.5%
associate-+r+97.5%
associate-+r-58.3%
associate-+l-57.0%
associate-+r-52.7%
Simplified34.6%
Taylor expanded in t around inf 18.7%
associate--l+39.5%
+-commutative39.5%
+-commutative39.5%
+-commutative39.5%
associate-+l+39.5%
+-commutative39.5%
Simplified39.5%
Taylor expanded in x around inf 28.8%
mul-1-neg28.8%
Simplified28.8%
Taylor expanded in x around 0 28.8%
if 4.5999999999999996 < x Initial program 84.5%
+-commutative84.5%
associate-+r+84.5%
associate-+r-83.0%
associate-+l-60.4%
associate-+r-47.3%
Simplified47.3%
Taylor expanded in t around inf 5.0%
associate--l+6.6%
+-commutative6.6%
+-commutative6.6%
+-commutative6.6%
associate-+l+6.6%
+-commutative6.6%
Simplified6.6%
Taylor expanded in x around inf 3.7%
mul-1-neg3.7%
Simplified3.7%
Taylor expanded in x around inf 9.6%
Final simplification19.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x 1.05) (- (+ 1.0 (* x (+ 0.5 (* x -0.125)))) (sqrt x)) (* 0.5 (sqrt (/ 1.0 x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.05) {
tmp = (1.0 + (x * (0.5 + (x * -0.125)))) - sqrt(x);
} else {
tmp = 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) :: tmp
if (x <= 1.05d0) then
tmp = (1.0d0 + (x * (0.5d0 + (x * (-0.125d0))))) - sqrt(x)
else
tmp = 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 tmp;
if (x <= 1.05) {
tmp = (1.0 + (x * (0.5 + (x * -0.125)))) - Math.sqrt(x);
} else {
tmp = 0.5 * Math.sqrt((1.0 / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 1.05: tmp = (1.0 + (x * (0.5 + (x * -0.125)))) - math.sqrt(x) else: tmp = 0.5 * math.sqrt((1.0 / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 1.05) tmp = Float64(Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * -0.125)))) - sqrt(x)); else tmp = 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)
tmp = 0.0;
if (x <= 1.05)
tmp = (1.0 + (x * (0.5 + (x * -0.125)))) - sqrt(x);
else
tmp = 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_] := If[LessEqual[x, 1.05], N[(N[(1.0 + N[(x * N[(0.5 + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.05:\\
\;\;\;\;\left(1 + x \cdot \left(0.5 + x \cdot -0.125\right)\right) - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 1.05000000000000004Initial program 97.5%
+-commutative97.5%
associate-+r+97.5%
associate-+r-58.3%
associate-+l-57.0%
associate-+r-52.7%
Simplified34.6%
Taylor expanded in t around inf 18.7%
associate--l+39.5%
+-commutative39.5%
+-commutative39.5%
+-commutative39.5%
associate-+l+39.5%
+-commutative39.5%
Simplified39.5%
Taylor expanded in x around inf 28.8%
mul-1-neg28.8%
Simplified28.8%
Taylor expanded in x around 0 28.8%
if 1.05000000000000004 < x Initial program 84.5%
+-commutative84.5%
associate-+r+84.5%
associate-+r-83.0%
associate-+l-60.4%
associate-+r-47.3%
Simplified47.3%
Taylor expanded in t around inf 5.0%
associate--l+6.6%
+-commutative6.6%
+-commutative6.6%
+-commutative6.6%
associate-+l+6.6%
+-commutative6.6%
Simplified6.6%
Taylor expanded in x around inf 3.7%
mul-1-neg3.7%
Simplified3.7%
Taylor expanded in x around inf 9.6%
Final simplification19.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x 1.2) (- (+ 1.0 (* x 0.5)) (sqrt x)) (* 0.5 (sqrt (/ 1.0 x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.2) {
tmp = (1.0 + (x * 0.5)) - sqrt(x);
} else {
tmp = 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) :: tmp
if (x <= 1.2d0) then
tmp = (1.0d0 + (x * 0.5d0)) - sqrt(x)
else
tmp = 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 tmp;
if (x <= 1.2) {
tmp = (1.0 + (x * 0.5)) - Math.sqrt(x);
} else {
tmp = 0.5 * Math.sqrt((1.0 / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 1.2: tmp = (1.0 + (x * 0.5)) - math.sqrt(x) else: tmp = 0.5 * math.sqrt((1.0 / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 1.2) tmp = Float64(Float64(1.0 + Float64(x * 0.5)) - sqrt(x)); else tmp = 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)
tmp = 0.0;
if (x <= 1.2)
tmp = (1.0 + (x * 0.5)) - sqrt(x);
else
tmp = 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_] := If[LessEqual[x, 1.2], N[(N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.2:\\
\;\;\;\;\left(1 + x \cdot 0.5\right) - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 1.19999999999999996Initial program 97.5%
+-commutative97.5%
associate-+r+97.5%
associate-+r-58.3%
associate-+l-57.0%
associate-+r-52.7%
Simplified34.6%
Taylor expanded in t around inf 18.7%
associate--l+39.5%
+-commutative39.5%
+-commutative39.5%
+-commutative39.5%
associate-+l+39.5%
+-commutative39.5%
Simplified39.5%
Taylor expanded in x around inf 28.8%
mul-1-neg28.8%
Simplified28.8%
Taylor expanded in x around 0 28.8%
if 1.19999999999999996 < x Initial program 84.5%
+-commutative84.5%
associate-+r+84.5%
associate-+r-83.0%
associate-+l-60.4%
associate-+r-47.3%
Simplified47.3%
Taylor expanded in t around inf 5.0%
associate--l+6.6%
+-commutative6.6%
+-commutative6.6%
+-commutative6.6%
associate-+l+6.6%
+-commutative6.6%
Simplified6.6%
Taylor expanded in x around inf 3.7%
mul-1-neg3.7%
Simplified3.7%
Taylor expanded in x around inf 9.6%
Final simplification19.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x 0.23) (- 1.0 (sqrt x)) (* 0.5 (sqrt (/ 1.0 x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 0.23) {
tmp = 1.0 - sqrt(x);
} else {
tmp = 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) :: tmp
if (x <= 0.23d0) then
tmp = 1.0d0 - sqrt(x)
else
tmp = 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 tmp;
if (x <= 0.23) {
tmp = 1.0 - Math.sqrt(x);
} else {
tmp = 0.5 * Math.sqrt((1.0 / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 0.23: tmp = 1.0 - math.sqrt(x) else: tmp = 0.5 * math.sqrt((1.0 / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 0.23) tmp = Float64(1.0 - sqrt(x)); else tmp = 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)
tmp = 0.0;
if (x <= 0.23)
tmp = 1.0 - sqrt(x);
else
tmp = 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_] := If[LessEqual[x, 0.23], N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.23:\\
\;\;\;\;1 - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 0.23000000000000001Initial program 97.5%
+-commutative97.5%
associate-+r+97.5%
associate-+r-58.3%
associate-+l-57.0%
associate-+r-52.7%
Simplified34.6%
Taylor expanded in t around inf 18.7%
associate--l+39.5%
+-commutative39.5%
+-commutative39.5%
+-commutative39.5%
associate-+l+39.5%
+-commutative39.5%
Simplified39.5%
Taylor expanded in x around inf 28.8%
mul-1-neg28.8%
Simplified28.8%
Taylor expanded in x around 0 28.6%
if 0.23000000000000001 < x Initial program 84.5%
+-commutative84.5%
associate-+r+84.5%
associate-+r-83.0%
associate-+l-60.4%
associate-+r-47.3%
Simplified47.3%
Taylor expanded in t around inf 5.0%
associate--l+6.6%
+-commutative6.6%
+-commutative6.6%
+-commutative6.6%
associate-+l+6.6%
+-commutative6.6%
Simplified6.6%
Taylor expanded in x around inf 3.7%
mul-1-neg3.7%
Simplified3.7%
Taylor expanded in x around inf 9.6%
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.0%
+-commutative91.0%
associate-+r+91.0%
associate-+r-70.5%
associate-+l-58.7%
associate-+r-50.0%
Simplified40.9%
Taylor expanded in t around inf 11.9%
associate--l+23.2%
+-commutative23.2%
+-commutative23.2%
+-commutative23.2%
associate-+l+23.2%
+-commutative23.2%
Simplified23.2%
Taylor expanded in x around inf 16.3%
mul-1-neg16.3%
Simplified16.3%
Taylor expanded in x around 0 15.1%
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 91.0%
+-commutative91.0%
associate-+r+91.0%
associate-+r-70.5%
associate-+l-58.7%
associate-+r-50.0%
Simplified40.9%
Taylor expanded in t around inf 11.9%
associate--l+23.2%
+-commutative23.2%
+-commutative23.2%
+-commutative23.2%
associate-+l+23.2%
+-commutative23.2%
Simplified23.2%
Taylor expanded in x around inf 16.3%
mul-1-neg16.3%
Simplified16.3%
Taylor expanded in x around 0 15.1%
Taylor expanded in x around inf 1.6%
neg-mul-11.6%
Simplified1.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 2024091
(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))))