
(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 20 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 x) t_1))
(t_3 (sqrt (+ y 1.0)))
(t_4 (+ (sqrt y) t_3))
(t_5 (- t_3 (sqrt y)))
(t_6 (sqrt (+ 1.0 t))))
(if (<= t_5 0.1)
(+
(/ (/ (+ t_4 t_2) t_2) t_4)
(+ (* 0.5 (sqrt (/ 1.0 z))) (- t_6 (sqrt t))))
(+
(+ t_5 (- t_1 (sqrt x)))
(+ (/ 1.0 (+ (sqrt z) (sqrt (+ 1.0 z)))) (/ 1.0 (+ t_6 (sqrt t))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + x));
double t_2 = sqrt(x) + t_1;
double t_3 = sqrt((y + 1.0));
double t_4 = sqrt(y) + t_3;
double t_5 = t_3 - sqrt(y);
double t_6 = sqrt((1.0 + t));
double tmp;
if (t_5 <= 0.1) {
tmp = (((t_4 + t_2) / t_2) / t_4) + ((0.5 * sqrt((1.0 / z))) + (t_6 - sqrt(t)));
} else {
tmp = (t_5 + (t_1 - sqrt(x))) + ((1.0 / (sqrt(z) + sqrt((1.0 + z)))) + (1.0 / (t_6 + sqrt(t))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = sqrt((1.0d0 + x))
t_2 = sqrt(x) + t_1
t_3 = sqrt((y + 1.0d0))
t_4 = sqrt(y) + t_3
t_5 = t_3 - sqrt(y)
t_6 = sqrt((1.0d0 + t))
if (t_5 <= 0.1d0) then
tmp = (((t_4 + t_2) / t_2) / t_4) + ((0.5d0 * sqrt((1.0d0 / z))) + (t_6 - sqrt(t)))
else
tmp = (t_5 + (t_1 - sqrt(x))) + ((1.0d0 / (sqrt(z) + sqrt((1.0d0 + z)))) + (1.0d0 / (t_6 + sqrt(t))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + x));
double t_2 = Math.sqrt(x) + t_1;
double t_3 = Math.sqrt((y + 1.0));
double t_4 = Math.sqrt(y) + t_3;
double t_5 = t_3 - Math.sqrt(y);
double t_6 = Math.sqrt((1.0 + t));
double tmp;
if (t_5 <= 0.1) {
tmp = (((t_4 + t_2) / t_2) / t_4) + ((0.5 * Math.sqrt((1.0 / z))) + (t_6 - Math.sqrt(t)));
} else {
tmp = (t_5 + (t_1 - Math.sqrt(x))) + ((1.0 / (Math.sqrt(z) + Math.sqrt((1.0 + z)))) + (1.0 / (t_6 + Math.sqrt(t))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + x)) t_2 = math.sqrt(x) + t_1 t_3 = math.sqrt((y + 1.0)) t_4 = math.sqrt(y) + t_3 t_5 = t_3 - math.sqrt(y) t_6 = math.sqrt((1.0 + t)) tmp = 0 if t_5 <= 0.1: tmp = (((t_4 + t_2) / t_2) / t_4) + ((0.5 * math.sqrt((1.0 / z))) + (t_6 - math.sqrt(t))) else: tmp = (t_5 + (t_1 - math.sqrt(x))) + ((1.0 / (math.sqrt(z) + math.sqrt((1.0 + z)))) + (1.0 / (t_6 + math.sqrt(t)))) 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(x) + t_1) t_3 = sqrt(Float64(y + 1.0)) t_4 = Float64(sqrt(y) + t_3) t_5 = Float64(t_3 - sqrt(y)) t_6 = sqrt(Float64(1.0 + t)) tmp = 0.0 if (t_5 <= 0.1) tmp = Float64(Float64(Float64(Float64(t_4 + t_2) / t_2) / t_4) + Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + Float64(t_6 - sqrt(t)))); else tmp = Float64(Float64(t_5 + Float64(t_1 - sqrt(x))) + Float64(Float64(1.0 / Float64(sqrt(z) + sqrt(Float64(1.0 + z)))) + Float64(1.0 / Float64(t_6 + sqrt(t))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + x));
t_2 = sqrt(x) + t_1;
t_3 = sqrt((y + 1.0));
t_4 = sqrt(y) + t_3;
t_5 = t_3 - sqrt(y);
t_6 = sqrt((1.0 + t));
tmp = 0.0;
if (t_5 <= 0.1)
tmp = (((t_4 + t_2) / t_2) / t_4) + ((0.5 * sqrt((1.0 / z))) + (t_6 - sqrt(t)));
else
tmp = (t_5 + (t_1 - sqrt(x))) + ((1.0 / (sqrt(z) + sqrt((1.0 + z)))) + (1.0 / (t_6 + sqrt(t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[y], $MachinePrecision] + t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$5, 0.1], N[(N[(N[(N[(t$95$4 + t$95$2), $MachinePrecision] / t$95$2), $MachinePrecision] / t$95$4), $MachinePrecision] + N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$6 - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$5 + N[(t$95$1 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$6 + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + x}\\
t_2 := \sqrt{x} + t\_1\\
t_3 := \sqrt{y + 1}\\
t_4 := \sqrt{y} + t\_3\\
t_5 := t\_3 - \sqrt{y}\\
t_6 := \sqrt{1 + t}\\
\mathbf{if}\;t\_5 \leq 0.1:\\
\;\;\;\;\frac{\frac{t\_4 + t\_2}{t\_2}}{t\_4} + \left(0.5 \cdot \sqrt{\frac{1}{z}} + \left(t\_6 - \sqrt{t}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_5 + \left(t\_1 - \sqrt{x}\right)\right) + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \frac{1}{t\_6 + \sqrt{t}}\right)\\
\end{array}
\end{array}
if (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y)) < 0.10000000000000001Initial program 87.4%
associate-+l+87.4%
sub-neg87.4%
sub-neg87.4%
+-commutative87.4%
+-commutative87.4%
+-commutative87.4%
Simplified87.4%
+-commutative87.4%
flip--87.6%
flip--87.9%
frac-add87.9%
Applied egg-rr89.2%
*-commutative89.2%
*-commutative89.2%
+-commutative89.2%
*-commutative89.2%
associate-/r*89.2%
Simplified93.0%
Taylor expanded in z around inf 40.7%
if 0.10000000000000001 < (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y)) Initial program 97.7%
associate-+l+97.7%
sub-neg97.7%
sub-neg97.7%
+-commutative97.7%
+-commutative97.7%
+-commutative97.7%
Simplified97.7%
flip--98.4%
div-inv98.4%
add-sqr-sqrt81.1%
add-sqr-sqrt98.4%
Applied egg-rr98.4%
associate-*r/98.4%
*-rgt-identity98.4%
associate--l+98.5%
+-inverses98.5%
metadata-eval98.5%
+-commutative98.5%
Simplified98.5%
flip--98.5%
div-inv98.5%
add-sqr-sqrt76.9%
add-sqr-sqrt98.5%
Applied egg-rr98.5%
associate-*r/98.5%
*-rgt-identity98.5%
associate--l+99.1%
+-inverses99.1%
metadata-eval99.1%
+-commutative99.1%
Simplified99.1%
Final simplification69.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ 1.0 x)))
(t_2 (sqrt (+ 1.0 t)))
(t_3 (- (sqrt (+ y 1.0)) (sqrt y))))
(if (<= t_3 5e-6)
(+
(+ (* 0.5 (sqrt (/ 1.0 z))) (- t_2 (sqrt t)))
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) t_1))))
(+
(+ t_3 (- t_1 (sqrt x)))
(+ (/ 1.0 (+ (sqrt z) (sqrt (+ 1.0 z)))) (/ 1.0 (+ t_2 (sqrt t))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + x));
double t_2 = sqrt((1.0 + t));
double t_3 = sqrt((y + 1.0)) - sqrt(y);
double tmp;
if (t_3 <= 5e-6) {
tmp = ((0.5 * sqrt((1.0 / z))) + (t_2 - sqrt(t))) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_1)));
} else {
tmp = (t_3 + (t_1 - sqrt(x))) + ((1.0 / (sqrt(z) + sqrt((1.0 + z)))) + (1.0 / (t_2 + sqrt(t))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = sqrt((1.0d0 + x))
t_2 = sqrt((1.0d0 + t))
t_3 = sqrt((y + 1.0d0)) - sqrt(y)
if (t_3 <= 5d-6) then
tmp = ((0.5d0 * sqrt((1.0d0 / z))) + (t_2 - sqrt(t))) + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + t_1)))
else
tmp = (t_3 + (t_1 - sqrt(x))) + ((1.0d0 / (sqrt(z) + sqrt((1.0d0 + z)))) + (1.0d0 / (t_2 + sqrt(t))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + x));
double t_2 = Math.sqrt((1.0 + t));
double t_3 = Math.sqrt((y + 1.0)) - Math.sqrt(y);
double tmp;
if (t_3 <= 5e-6) {
tmp = ((0.5 * Math.sqrt((1.0 / z))) + (t_2 - Math.sqrt(t))) + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + t_1)));
} else {
tmp = (t_3 + (t_1 - Math.sqrt(x))) + ((1.0 / (Math.sqrt(z) + Math.sqrt((1.0 + z)))) + (1.0 / (t_2 + Math.sqrt(t))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + x)) t_2 = math.sqrt((1.0 + t)) t_3 = math.sqrt((y + 1.0)) - math.sqrt(y) tmp = 0 if t_3 <= 5e-6: tmp = ((0.5 * math.sqrt((1.0 / z))) + (t_2 - math.sqrt(t))) + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + t_1))) else: tmp = (t_3 + (t_1 - math.sqrt(x))) + ((1.0 / (math.sqrt(z) + math.sqrt((1.0 + z)))) + (1.0 / (t_2 + math.sqrt(t)))) 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 = sqrt(Float64(1.0 + t)) t_3 = Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) tmp = 0.0 if (t_3 <= 5e-6) tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + Float64(t_2 - sqrt(t))) + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + t_1)))); else tmp = Float64(Float64(t_3 + Float64(t_1 - sqrt(x))) + Float64(Float64(1.0 / Float64(sqrt(z) + sqrt(Float64(1.0 + z)))) + Float64(1.0 / Float64(t_2 + sqrt(t))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + x));
t_2 = sqrt((1.0 + t));
t_3 = sqrt((y + 1.0)) - sqrt(y);
tmp = 0.0;
if (t_3 <= 5e-6)
tmp = ((0.5 * sqrt((1.0 / z))) + (t_2 - sqrt(t))) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_1)));
else
tmp = (t_3 + (t_1 - sqrt(x))) + ((1.0 / (sqrt(z) + sqrt((1.0 + z)))) + (1.0 / (t_2 + sqrt(t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 5e-6], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$3 + N[(t$95$1 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$2 + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + x}\\
t_2 := \sqrt{1 + t}\\
t_3 := \sqrt{y + 1} - \sqrt{y}\\
\mathbf{if}\;t\_3 \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{z}} + \left(t\_2 - \sqrt{t}\right)\right) + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_3 + \left(t\_1 - \sqrt{x}\right)\right) + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \frac{1}{t\_2 + \sqrt{t}}\right)\\
\end{array}
\end{array}
if (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y)) < 5.00000000000000041e-6Initial program 87.3%
associate-+l+87.3%
sub-neg87.3%
sub-neg87.3%
+-commutative87.3%
+-commutative87.3%
+-commutative87.3%
Simplified87.3%
+-commutative87.3%
flip--87.4%
flip--87.7%
frac-add87.7%
Applied egg-rr88.8%
*-commutative88.8%
*-commutative88.8%
+-commutative88.8%
*-commutative88.8%
associate-/r*88.8%
Simplified92.7%
Taylor expanded in y around inf 92.7%
Taylor expanded in z around inf 41.3%
if 5.00000000000000041e-6 < (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y)) Initial program 97.4%
associate-+l+97.4%
sub-neg97.4%
sub-neg97.4%
+-commutative97.4%
+-commutative97.4%
+-commutative97.4%
Simplified97.4%
flip--98.1%
div-inv98.1%
add-sqr-sqrt80.7%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
associate-*r/98.1%
*-rgt-identity98.1%
associate--l+98.2%
+-inverses98.2%
metadata-eval98.2%
+-commutative98.2%
Simplified98.2%
flip--98.2%
div-inv98.2%
add-sqr-sqrt76.7%
add-sqr-sqrt98.2%
Applied egg-rr98.2%
associate-*r/98.2%
*-rgt-identity98.2%
associate--l+98.7%
+-inverses98.7%
metadata-eval98.7%
+-commutative98.7%
Simplified98.7%
Final simplification70.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 t))) (t_2 (sqrt (+ y 1.0))))
(if (<= (- t_2 (sqrt y)) 5e-6)
(+
(+ (* 0.5 (sqrt (/ 1.0 z))) (- t_1 (sqrt t)))
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x))))))
(-
(+
1.0
(+
t_2
(+ (/ 1.0 (+ (sqrt z) (sqrt (+ 1.0 z)))) (/ 1.0 (+ t_1 (sqrt t))))))
(+ (sqrt y) (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 + t));
double t_2 = sqrt((y + 1.0));
double tmp;
if ((t_2 - sqrt(y)) <= 5e-6) {
tmp = ((0.5 * sqrt((1.0 / z))) + (t_1 - sqrt(t))) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x)))));
} else {
tmp = (1.0 + (t_2 + ((1.0 / (sqrt(z) + sqrt((1.0 + z)))) + (1.0 / (t_1 + sqrt(t)))))) - (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((1.0d0 + t))
t_2 = sqrt((y + 1.0d0))
if ((t_2 - sqrt(y)) <= 5d-6) then
tmp = ((0.5d0 * sqrt((1.0d0 / z))) + (t_1 - sqrt(t))) + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))))
else
tmp = (1.0d0 + (t_2 + ((1.0d0 / (sqrt(z) + sqrt((1.0d0 + z)))) + (1.0d0 / (t_1 + sqrt(t)))))) - (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 t_1 = Math.sqrt((1.0 + t));
double t_2 = Math.sqrt((y + 1.0));
double tmp;
if ((t_2 - Math.sqrt(y)) <= 5e-6) {
tmp = ((0.5 * Math.sqrt((1.0 / z))) + (t_1 - Math.sqrt(t))) + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))));
} else {
tmp = (1.0 + (t_2 + ((1.0 / (Math.sqrt(z) + Math.sqrt((1.0 + z)))) + (1.0 / (t_1 + Math.sqrt(t)))))) - (Math.sqrt(y) + 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 + t)) t_2 = math.sqrt((y + 1.0)) tmp = 0 if (t_2 - math.sqrt(y)) <= 5e-6: tmp = ((0.5 * math.sqrt((1.0 / z))) + (t_1 - math.sqrt(t))) + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + math.sqrt((1.0 + x))))) else: tmp = (1.0 + (t_2 + ((1.0 / (math.sqrt(z) + math.sqrt((1.0 + z)))) + (1.0 / (t_1 + math.sqrt(t)))))) - (math.sqrt(y) + 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 + t)) t_2 = sqrt(Float64(y + 1.0)) tmp = 0.0 if (Float64(t_2 - sqrt(y)) <= 5e-6) tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + Float64(t_1 - sqrt(t))) + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))))); else tmp = Float64(Float64(1.0 + Float64(t_2 + Float64(Float64(1.0 / Float64(sqrt(z) + sqrt(Float64(1.0 + z)))) + Float64(1.0 / Float64(t_1 + sqrt(t)))))) - 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)
t_1 = sqrt((1.0 + t));
t_2 = sqrt((y + 1.0));
tmp = 0.0;
if ((t_2 - sqrt(y)) <= 5e-6)
tmp = ((0.5 * sqrt((1.0 / z))) + (t_1 - sqrt(t))) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x)))));
else
tmp = (1.0 + (t_2 + ((1.0 / (sqrt(z) + sqrt((1.0 + z)))) + (1.0 / (t_1 + sqrt(t)))))) - (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_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision], 5e-6], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(t$95$2 + N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$1 + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + 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 + t}\\
t_2 := \sqrt{y + 1}\\
\mathbf{if}\;t\_2 - \sqrt{y} \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{z}} + \left(t\_1 - \sqrt{t}\right)\right) + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(t\_2 + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \frac{1}{t\_1 + \sqrt{t}}\right)\right)\right) - \left(\sqrt{y} + \sqrt{x}\right)\\
\end{array}
\end{array}
if (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y)) < 5.00000000000000041e-6Initial program 87.3%
associate-+l+87.3%
sub-neg87.3%
sub-neg87.3%
+-commutative87.3%
+-commutative87.3%
+-commutative87.3%
Simplified87.3%
+-commutative87.3%
flip--87.4%
flip--87.7%
frac-add87.7%
Applied egg-rr88.8%
*-commutative88.8%
*-commutative88.8%
+-commutative88.8%
*-commutative88.8%
associate-/r*88.8%
Simplified92.7%
Taylor expanded in y around inf 92.7%
Taylor expanded in z around inf 41.3%
if 5.00000000000000041e-6 < (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y)) Initial program 97.4%
associate-+l+97.4%
sub-neg97.4%
sub-neg97.4%
+-commutative97.4%
+-commutative97.4%
+-commutative97.4%
Simplified97.4%
flip--98.1%
div-inv98.1%
add-sqr-sqrt80.7%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
associate-*r/98.1%
*-rgt-identity98.1%
associate--l+98.2%
+-inverses98.2%
metadata-eval98.2%
+-commutative98.2%
Simplified98.2%
flip--98.2%
div-inv98.2%
add-sqr-sqrt76.7%
add-sqr-sqrt98.2%
Applied egg-rr98.2%
associate-*r/98.2%
*-rgt-identity98.2%
associate--l+98.7%
+-inverses98.7%
metadata-eval98.7%
+-commutative98.7%
Simplified98.7%
Taylor expanded in x around 0 49.1%
Final simplification45.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 t)) (sqrt t))))
(if (<= y 4600000000.0)
(+
(- (+ 1.0 (sqrt (+ y 1.0))) (+ (sqrt y) (sqrt x)))
(+ t_1 (/ 1.0 (+ (sqrt z) (sqrt (+ 1.0 z))))))
(+
(+ (* 0.5 (sqrt (/ 1.0 z))) t_1)
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))))))))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 tmp;
if (y <= 4600000000.0) {
tmp = ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x))) + (t_1 + (1.0 / (sqrt(z) + sqrt((1.0 + z)))));
} else {
tmp = ((0.5 * sqrt((1.0 / z))) + t_1) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x)))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((1.0d0 + t)) - sqrt(t)
if (y <= 4600000000.0d0) then
tmp = ((1.0d0 + sqrt((y + 1.0d0))) - (sqrt(y) + sqrt(x))) + (t_1 + (1.0d0 / (sqrt(z) + sqrt((1.0d0 + z)))))
else
tmp = ((0.5d0 * sqrt((1.0d0 / z))) + t_1) + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double tmp;
if (y <= 4600000000.0) {
tmp = ((1.0 + Math.sqrt((y + 1.0))) - (Math.sqrt(y) + Math.sqrt(x))) + (t_1 + (1.0 / (Math.sqrt(z) + Math.sqrt((1.0 + z)))));
} else {
tmp = ((0.5 * Math.sqrt((1.0 / z))) + t_1) + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))));
}
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) tmp = 0 if y <= 4600000000.0: tmp = ((1.0 + math.sqrt((y + 1.0))) - (math.sqrt(y) + math.sqrt(x))) + (t_1 + (1.0 / (math.sqrt(z) + math.sqrt((1.0 + z))))) else: tmp = ((0.5 * math.sqrt((1.0 / z))) + t_1) + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + math.sqrt((1.0 + x))))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) tmp = 0.0 if (y <= 4600000000.0) tmp = Float64(Float64(Float64(1.0 + sqrt(Float64(y + 1.0))) - Float64(sqrt(y) + sqrt(x))) + Float64(t_1 + Float64(1.0 / Float64(sqrt(z) + sqrt(Float64(1.0 + z)))))); else tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + t_1) + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + t)) - sqrt(t);
tmp = 0.0;
if (y <= 4600000000.0)
tmp = ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x))) + (t_1 + (1.0 / (sqrt(z) + sqrt((1.0 + z)))));
else
tmp = ((0.5 * sqrt((1.0 / z))) + t_1) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x)))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 4600000000.0], N[(N[(N[(1.0 + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $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 + t} - \sqrt{t}\\
\mathbf{if}\;y \leq 4600000000:\\
\;\;\;\;\left(\left(1 + \sqrt{y + 1}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right) + \left(t\_1 + \frac{1}{\sqrt{z} + \sqrt{1 + z}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{z}} + t\_1\right) + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\\
\end{array}
\end{array}
if y < 4.6e9Initial program 97.4%
associate-+l+97.4%
sub-neg97.4%
sub-neg97.4%
+-commutative97.4%
+-commutative97.4%
+-commutative97.4%
Simplified97.4%
Taylor expanded in x around 0 48.7%
flip--98.2%
div-inv98.2%
add-sqr-sqrt76.7%
add-sqr-sqrt98.2%
Applied egg-rr48.7%
associate-*r/98.2%
*-rgt-identity98.2%
associate--l+98.7%
+-inverses98.7%
metadata-eval98.7%
+-commutative98.7%
Simplified48.7%
if 4.6e9 < y Initial program 87.3%
associate-+l+87.3%
sub-neg87.3%
sub-neg87.3%
+-commutative87.3%
+-commutative87.3%
+-commutative87.3%
Simplified87.3%
+-commutative87.3%
flip--87.4%
flip--87.7%
frac-add87.7%
Applied egg-rr88.8%
*-commutative88.8%
*-commutative88.8%
+-commutative88.8%
*-commutative88.8%
associate-/r*88.8%
Simplified92.7%
Taylor expanded in y around inf 92.7%
Taylor expanded in z around inf 41.3%
Final simplification45.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ 1.0 t))))
(if (<= y 650000000.0)
(+
(- (+ 1.0 (sqrt (+ y 1.0))) (+ (sqrt y) (sqrt x)))
(+ (/ 1.0 (+ t_1 (sqrt t))) (- (sqrt (+ 1.0 z)) (sqrt z))))
(+
(+ (* 0.5 (sqrt (/ 1.0 z))) (- t_1 (sqrt t)))
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + t));
double tmp;
if (y <= 650000000.0) {
tmp = ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x))) + ((1.0 / (t_1 + sqrt(t))) + (sqrt((1.0 + z)) - sqrt(z)));
} else {
tmp = ((0.5 * sqrt((1.0 / z))) + (t_1 - sqrt(t))) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x)))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((1.0d0 + t))
if (y <= 650000000.0d0) then
tmp = ((1.0d0 + sqrt((y + 1.0d0))) - (sqrt(y) + sqrt(x))) + ((1.0d0 / (t_1 + sqrt(t))) + (sqrt((1.0d0 + z)) - sqrt(z)))
else
tmp = ((0.5d0 * sqrt((1.0d0 / z))) + (t_1 - sqrt(t))) + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + t));
double tmp;
if (y <= 650000000.0) {
tmp = ((1.0 + Math.sqrt((y + 1.0))) - (Math.sqrt(y) + Math.sqrt(x))) + ((1.0 / (t_1 + Math.sqrt(t))) + (Math.sqrt((1.0 + z)) - Math.sqrt(z)));
} else {
tmp = ((0.5 * Math.sqrt((1.0 / z))) + (t_1 - Math.sqrt(t))) + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + t)) tmp = 0 if y <= 650000000.0: tmp = ((1.0 + math.sqrt((y + 1.0))) - (math.sqrt(y) + math.sqrt(x))) + ((1.0 / (t_1 + math.sqrt(t))) + (math.sqrt((1.0 + z)) - math.sqrt(z))) else: tmp = ((0.5 * math.sqrt((1.0 / z))) + (t_1 - math.sqrt(t))) + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + math.sqrt((1.0 + x))))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 + t)) tmp = 0.0 if (y <= 650000000.0) tmp = Float64(Float64(Float64(1.0 + sqrt(Float64(y + 1.0))) - Float64(sqrt(y) + sqrt(x))) + Float64(Float64(1.0 / Float64(t_1 + sqrt(t))) + Float64(sqrt(Float64(1.0 + z)) - sqrt(z)))); else tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + Float64(t_1 - sqrt(t))) + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + t));
tmp = 0.0;
if (y <= 650000000.0)
tmp = ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x))) + ((1.0 / (t_1 + sqrt(t))) + (sqrt((1.0 + z)) - sqrt(z)));
else
tmp = ((0.5 * sqrt((1.0 / z))) + (t_1 - sqrt(t))) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x)))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 650000000.0], N[(N[(N[(1.0 + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(t$95$1 + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $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 + t}\\
\mathbf{if}\;y \leq 650000000:\\
\;\;\;\;\left(\left(1 + \sqrt{y + 1}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right) + \left(\frac{1}{t\_1 + \sqrt{t}} + \left(\sqrt{1 + z} - \sqrt{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{z}} + \left(t\_1 - \sqrt{t}\right)\right) + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\\
\end{array}
\end{array}
if y < 6.5e8Initial program 97.5%
associate-+l+97.5%
sub-neg97.5%
sub-neg97.5%
+-commutative97.5%
+-commutative97.5%
+-commutative97.5%
Simplified97.5%
flip--98.2%
div-inv98.2%
add-sqr-sqrt80.7%
add-sqr-sqrt98.2%
Applied egg-rr98.2%
associate-*r/98.2%
*-rgt-identity98.2%
associate--l+98.3%
+-inverses98.3%
metadata-eval98.3%
+-commutative98.3%
Simplified98.3%
Taylor expanded in x around 0 48.9%
if 6.5e8 < y Initial program 87.2%
associate-+l+87.2%
sub-neg87.2%
sub-neg87.2%
+-commutative87.2%
+-commutative87.2%
+-commutative87.2%
Simplified87.2%
+-commutative87.2%
flip--87.3%
flip--87.6%
frac-add87.6%
Applied egg-rr88.9%
*-commutative88.9%
*-commutative88.9%
+-commutative88.9%
*-commutative88.9%
associate-/r*88.9%
Simplified92.8%
Taylor expanded in y around inf 92.8%
Taylor expanded in z around inf 41.1%
Final simplification45.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (sqrt (+ 1.0 t)) (sqrt t))))
(if (<= y 650000000.0)
(+
(+ 1.0 (- (sqrt (+ y 1.0)) (+ (sqrt y) (sqrt x))))
(+ t_1 (- (sqrt (+ 1.0 z)) (sqrt z))))
(+
(+ (* 0.5 (sqrt (/ 1.0 z))) t_1)
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))))))))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 tmp;
if (y <= 650000000.0) {
tmp = (1.0 + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)))) + (t_1 + (sqrt((1.0 + z)) - sqrt(z)));
} else {
tmp = ((0.5 * sqrt((1.0 / z))) + t_1) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x)))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((1.0d0 + t)) - sqrt(t)
if (y <= 650000000.0d0) then
tmp = (1.0d0 + (sqrt((y + 1.0d0)) - (sqrt(y) + sqrt(x)))) + (t_1 + (sqrt((1.0d0 + z)) - sqrt(z)))
else
tmp = ((0.5d0 * sqrt((1.0d0 / z))) + t_1) + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double tmp;
if (y <= 650000000.0) {
tmp = (1.0 + (Math.sqrt((y + 1.0)) - (Math.sqrt(y) + Math.sqrt(x)))) + (t_1 + (Math.sqrt((1.0 + z)) - Math.sqrt(z)));
} else {
tmp = ((0.5 * Math.sqrt((1.0 / z))) + t_1) + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))));
}
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) tmp = 0 if y <= 650000000.0: tmp = (1.0 + (math.sqrt((y + 1.0)) - (math.sqrt(y) + math.sqrt(x)))) + (t_1 + (math.sqrt((1.0 + z)) - math.sqrt(z))) else: tmp = ((0.5 * math.sqrt((1.0 / z))) + t_1) + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + math.sqrt((1.0 + x))))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) tmp = 0.0 if (y <= 650000000.0) tmp = Float64(Float64(1.0 + Float64(sqrt(Float64(y + 1.0)) - Float64(sqrt(y) + sqrt(x)))) + Float64(t_1 + Float64(sqrt(Float64(1.0 + z)) - sqrt(z)))); else tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + t_1) + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + t)) - sqrt(t);
tmp = 0.0;
if (y <= 650000000.0)
tmp = (1.0 + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)))) + (t_1 + (sqrt((1.0 + z)) - sqrt(z)));
else
tmp = ((0.5 * sqrt((1.0 / z))) + t_1) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x)))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 650000000.0], N[(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[(t$95$1 + N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $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 + t} - \sqrt{t}\\
\mathbf{if}\;y \leq 650000000:\\
\;\;\;\;\left(1 + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\right) + \left(t\_1 + \left(\sqrt{1 + z} - \sqrt{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{z}} + t\_1\right) + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\\
\end{array}
\end{array}
if y < 6.5e8Initial program 97.5%
associate-+l+97.5%
sub-neg97.5%
sub-neg97.5%
+-commutative97.5%
+-commutative97.5%
+-commutative97.5%
Simplified97.5%
Taylor expanded in x around 0 48.4%
associate--l+48.4%
+-commutative48.4%
Simplified48.4%
if 6.5e8 < y Initial program 87.2%
associate-+l+87.2%
sub-neg87.2%
sub-neg87.2%
+-commutative87.2%
+-commutative87.2%
+-commutative87.2%
Simplified87.2%
+-commutative87.2%
flip--87.3%
flip--87.6%
frac-add87.6%
Applied egg-rr88.9%
*-commutative88.9%
*-commutative88.9%
+-commutative88.9%
*-commutative88.9%
associate-/r*88.9%
Simplified92.8%
Taylor expanded in y around inf 92.8%
Taylor expanded in z around inf 41.1%
Final simplification44.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 (+ 1.0 t)) (sqrt t))))
(if (<= y 2.2)
(+
(+ t_1 (- (sqrt (+ 1.0 z)) (sqrt z)))
(+ 2.0 (- (* y 0.5) (+ (sqrt y) (sqrt x)))))
(+
(+ (* 0.5 (sqrt (/ 1.0 z))) t_1)
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))))))))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 tmp;
if (y <= 2.2) {
tmp = (t_1 + (sqrt((1.0 + z)) - sqrt(z))) + (2.0 + ((y * 0.5) - (sqrt(y) + sqrt(x))));
} else {
tmp = ((0.5 * sqrt((1.0 / z))) + t_1) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x)))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((1.0d0 + t)) - sqrt(t)
if (y <= 2.2d0) then
tmp = (t_1 + (sqrt((1.0d0 + z)) - sqrt(z))) + (2.0d0 + ((y * 0.5d0) - (sqrt(y) + sqrt(x))))
else
tmp = ((0.5d0 * sqrt((1.0d0 / z))) + t_1) + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x)))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double tmp;
if (y <= 2.2) {
tmp = (t_1 + (Math.sqrt((1.0 + z)) - Math.sqrt(z))) + (2.0 + ((y * 0.5) - (Math.sqrt(y) + Math.sqrt(x))));
} else {
tmp = ((0.5 * Math.sqrt((1.0 / z))) + t_1) + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x)))));
}
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) tmp = 0 if y <= 2.2: tmp = (t_1 + (math.sqrt((1.0 + z)) - math.sqrt(z))) + (2.0 + ((y * 0.5) - (math.sqrt(y) + math.sqrt(x)))) else: tmp = ((0.5 * math.sqrt((1.0 / z))) + t_1) + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + math.sqrt((1.0 + x))))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) tmp = 0.0 if (y <= 2.2) tmp = Float64(Float64(t_1 + Float64(sqrt(Float64(1.0 + z)) - sqrt(z))) + Float64(2.0 + Float64(Float64(y * 0.5) - Float64(sqrt(y) + sqrt(x))))); else tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + t_1) + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x)))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + t)) - sqrt(t);
tmp = 0.0;
if (y <= 2.2)
tmp = (t_1 + (sqrt((1.0 + z)) - sqrt(z))) + (2.0 + ((y * 0.5) - (sqrt(y) + sqrt(x))));
else
tmp = ((0.5 * sqrt((1.0 / z))) + t_1) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x)))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2.2], N[(N[(t$95$1 + N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 + N[(N[(y * 0.5), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $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 + t} - \sqrt{t}\\
\mathbf{if}\;y \leq 2.2:\\
\;\;\;\;\left(t\_1 + \left(\sqrt{1 + z} - \sqrt{z}\right)\right) + \left(2 + \left(y \cdot 0.5 - \left(\sqrt{y} + \sqrt{x}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{z}} + t\_1\right) + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right)\\
\end{array}
\end{array}
if y < 2.2000000000000002Initial program 97.6%
associate-+l+97.6%
sub-neg97.6%
sub-neg97.6%
+-commutative97.6%
+-commutative97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around 0 47.7%
Taylor expanded in y around 0 47.5%
associate--l+47.5%
Simplified47.5%
if 2.2000000000000002 < y Initial program 87.6%
associate-+l+87.6%
sub-neg87.6%
sub-neg87.6%
+-commutative87.6%
+-commutative87.6%
+-commutative87.6%
Simplified87.6%
+-commutative87.6%
flip--87.8%
flip--88.1%
frac-add88.1%
Applied egg-rr89.4%
*-commutative89.4%
*-commutative89.4%
+-commutative89.4%
*-commutative89.4%
associate-/r*89.4%
Simplified93.1%
Taylor expanded in y around inf 90.8%
Taylor expanded in z around inf 39.9%
Final simplification43.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 z))) (t_2 (- t_1 (sqrt z))) (t_3 (sqrt (+ 1.0 x))))
(if (<= y 5.2e-46)
(+ (+ (- (sqrt (+ 1.0 t)) (sqrt t)) t_2) (- (- 2.0 (sqrt x)) (sqrt y)))
(if (<= y 105000000.0)
(-
(+ t_3 (+ (sqrt (+ y 1.0)) (/ 1.0 (+ (sqrt z) t_1))))
(+ (sqrt y) (sqrt x)))
(+ (+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) t_3))) t_2)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + z));
double t_2 = t_1 - sqrt(z);
double t_3 = sqrt((1.0 + x));
double tmp;
if (y <= 5.2e-46) {
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + t_2) + ((2.0 - sqrt(x)) - sqrt(y));
} else if (y <= 105000000.0) {
tmp = (t_3 + (sqrt((y + 1.0)) + (1.0 / (sqrt(z) + t_1)))) - (sqrt(y) + sqrt(x));
} else {
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_3))) + t_2;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = sqrt((1.0d0 + z))
t_2 = t_1 - sqrt(z)
t_3 = sqrt((1.0d0 + x))
if (y <= 5.2d-46) then
tmp = ((sqrt((1.0d0 + t)) - sqrt(t)) + t_2) + ((2.0d0 - sqrt(x)) - sqrt(y))
else if (y <= 105000000.0d0) then
tmp = (t_3 + (sqrt((y + 1.0d0)) + (1.0d0 / (sqrt(z) + t_1)))) - (sqrt(y) + sqrt(x))
else
tmp = ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + t_3))) + t_2
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + z));
double t_2 = t_1 - Math.sqrt(z);
double t_3 = Math.sqrt((1.0 + x));
double tmp;
if (y <= 5.2e-46) {
tmp = ((Math.sqrt((1.0 + t)) - Math.sqrt(t)) + t_2) + ((2.0 - Math.sqrt(x)) - Math.sqrt(y));
} else if (y <= 105000000.0) {
tmp = (t_3 + (Math.sqrt((y + 1.0)) + (1.0 / (Math.sqrt(z) + t_1)))) - (Math.sqrt(y) + Math.sqrt(x));
} else {
tmp = ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + t_3))) + t_2;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + z)) t_2 = t_1 - math.sqrt(z) t_3 = math.sqrt((1.0 + x)) tmp = 0 if y <= 5.2e-46: tmp = ((math.sqrt((1.0 + t)) - math.sqrt(t)) + t_2) + ((2.0 - math.sqrt(x)) - math.sqrt(y)) elif y <= 105000000.0: tmp = (t_3 + (math.sqrt((y + 1.0)) + (1.0 / (math.sqrt(z) + t_1)))) - (math.sqrt(y) + math.sqrt(x)) else: tmp = ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + t_3))) + t_2 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 + z)) t_2 = Float64(t_1 - sqrt(z)) t_3 = sqrt(Float64(1.0 + x)) tmp = 0.0 if (y <= 5.2e-46) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + t_2) + Float64(Float64(2.0 - sqrt(x)) - sqrt(y))); elseif (y <= 105000000.0) tmp = Float64(Float64(t_3 + Float64(sqrt(Float64(y + 1.0)) + Float64(1.0 / Float64(sqrt(z) + t_1)))) - Float64(sqrt(y) + sqrt(x))); else tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + t_3))) + t_2); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + z));
t_2 = t_1 - sqrt(z);
t_3 = sqrt((1.0 + x));
tmp = 0.0;
if (y <= 5.2e-46)
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + t_2) + ((2.0 - sqrt(x)) - sqrt(y));
elseif (y <= 105000000.0)
tmp = (t_3 + (sqrt((y + 1.0)) + (1.0 / (sqrt(z) + t_1)))) - (sqrt(y) + sqrt(x));
else
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_3))) + t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 5.2e-46], N[(N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] + N[(N[(2.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 105000000.0], N[(N[(t$95$3 + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z}\\
t_2 := t\_1 - \sqrt{z}\\
t_3 := \sqrt{1 + x}\\
\mathbf{if}\;y \leq 5.2 \cdot 10^{-46}:\\
\;\;\;\;\left(\left(\sqrt{1 + t} - \sqrt{t}\right) + t\_2\right) + \left(\left(2 - \sqrt{x}\right) - \sqrt{y}\right)\\
\mathbf{elif}\;y \leq 105000000:\\
\;\;\;\;\left(t\_3 + \left(\sqrt{y + 1} + \frac{1}{\sqrt{z} + t\_1}\right)\right) - \left(\sqrt{y} + \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_3}\right) + t\_2\\
\end{array}
\end{array}
if y < 5.2000000000000004e-46Initial program 97.6%
associate-+l+97.6%
sub-neg97.6%
sub-neg97.6%
+-commutative97.6%
+-commutative97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around 0 48.2%
Taylor expanded in y around 0 48.2%
associate--r+48.2%
Simplified48.2%
if 5.2000000000000004e-46 < y < 1.05e8Initial program 97.9%
associate-+l+97.8%
sub-neg97.8%
sub-neg97.8%
+-commutative97.8%
+-commutative97.8%
+-commutative97.8%
Simplified97.8%
flip--97.9%
div-inv97.8%
add-sqr-sqrt85.9%
add-sqr-sqrt97.9%
Applied egg-rr97.9%
associate-*r/97.9%
*-rgt-identity97.9%
associate--l+97.9%
+-inverses97.9%
metadata-eval97.9%
+-commutative97.9%
Simplified97.9%
flip--97.8%
div-inv97.8%
add-sqr-sqrt84.7%
add-sqr-sqrt97.8%
Applied egg-rr97.8%
associate-*r/97.8%
*-rgt-identity97.8%
associate--l+97.8%
+-inverses97.8%
metadata-eval97.8%
+-commutative97.8%
Simplified97.8%
Taylor expanded in t around inf 29.4%
if 1.05e8 < y Initial program 87.2%
associate-+l+87.2%
sub-neg87.2%
sub-neg87.2%
+-commutative87.2%
+-commutative87.2%
+-commutative87.2%
Simplified87.2%
+-commutative87.2%
flip--87.4%
flip--87.7%
frac-add87.7%
Applied egg-rr89.0%
*-commutative89.0%
*-commutative89.0%
+-commutative89.0%
*-commutative89.0%
associate-/r*89.0%
Simplified92.8%
Taylor expanded in y around inf 92.7%
Taylor expanded in t around inf 43.6%
Final simplification44.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)) (sqrt z))))
(if (<= y 0.92)
(+
(+ (- (sqrt (+ 1.0 t)) (sqrt t)) t_1)
(+ 2.0 (- (* y 0.5) (+ (sqrt y) (sqrt x)))))
(+
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))))
t_1))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + z)) - sqrt(z);
double tmp;
if (y <= 0.92) {
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + t_1) + (2.0 + ((y * 0.5) - (sqrt(y) + sqrt(x))));
} else {
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))) + 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((1.0d0 + z)) - sqrt(z)
if (y <= 0.92d0) then
tmp = ((sqrt((1.0d0 + t)) - sqrt(t)) + t_1) + (2.0d0 + ((y * 0.5d0) - (sqrt(y) + sqrt(x))))
else
tmp = ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x))))) + 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((1.0 + z)) - Math.sqrt(z);
double tmp;
if (y <= 0.92) {
tmp = ((Math.sqrt((1.0 + t)) - Math.sqrt(t)) + t_1) + (2.0 + ((y * 0.5) - (Math.sqrt(y) + Math.sqrt(x))));
} else {
tmp = ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x))))) + t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + z)) - math.sqrt(z) tmp = 0 if y <= 0.92: tmp = ((math.sqrt((1.0 + t)) - math.sqrt(t)) + t_1) + (2.0 + ((y * 0.5) - (math.sqrt(y) + math.sqrt(x)))) else: tmp = ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + math.sqrt((1.0 + x))))) + t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) tmp = 0.0 if (y <= 0.92) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + t_1) + Float64(2.0 + Float64(Float64(y * 0.5) - Float64(sqrt(y) + sqrt(x))))); else tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x))))) + t_1); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + z)) - sqrt(z);
tmp = 0.0;
if (y <= 0.92)
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + t_1) + (2.0 + ((y * 0.5) - (sqrt(y) + sqrt(x))));
else
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.92], N[(N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(2.0 + N[(N[(y * 0.5), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z} - \sqrt{z}\\
\mathbf{if}\;y \leq 0.92:\\
\;\;\;\;\left(\left(\sqrt{1 + t} - \sqrt{t}\right) + t\_1\right) + \left(2 + \left(y \cdot 0.5 - \left(\sqrt{y} + \sqrt{x}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right) + t\_1\\
\end{array}
\end{array}
if y < 0.92000000000000004Initial program 97.6%
associate-+l+97.6%
sub-neg97.6%
sub-neg97.6%
+-commutative97.6%
+-commutative97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around 0 47.7%
Taylor expanded in y around 0 47.5%
associate--l+47.5%
Simplified47.5%
if 0.92000000000000004 < y Initial program 87.6%
associate-+l+87.6%
sub-neg87.6%
sub-neg87.6%
+-commutative87.6%
+-commutative87.6%
+-commutative87.6%
Simplified87.6%
+-commutative87.6%
flip--87.8%
flip--88.1%
frac-add88.1%
Applied egg-rr89.4%
*-commutative89.4%
*-commutative89.4%
+-commutative89.4%
*-commutative89.4%
associate-/r*89.4%
Simplified93.1%
Taylor expanded in y around inf 90.8%
Taylor expanded in t around inf 43.2%
Final simplification45.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (sqrt (+ 1.0 z)) (sqrt z))))
(if (<= y 0.206)
(+ (+ (- (sqrt (+ 1.0 t)) (sqrt t)) t_1) (- (- 2.0 (sqrt x)) (sqrt y)))
(+
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))))
t_1))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + z)) - sqrt(z);
double tmp;
if (y <= 0.206) {
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + t_1) + ((2.0 - sqrt(x)) - sqrt(y));
} else {
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))) + 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((1.0d0 + z)) - sqrt(z)
if (y <= 0.206d0) then
tmp = ((sqrt((1.0d0 + t)) - sqrt(t)) + t_1) + ((2.0d0 - sqrt(x)) - sqrt(y))
else
tmp = ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x))))) + 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((1.0 + z)) - Math.sqrt(z);
double tmp;
if (y <= 0.206) {
tmp = ((Math.sqrt((1.0 + t)) - Math.sqrt(t)) + t_1) + ((2.0 - Math.sqrt(x)) - Math.sqrt(y));
} else {
tmp = ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + Math.sqrt((1.0 + x))))) + t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + z)) - math.sqrt(z) tmp = 0 if y <= 0.206: tmp = ((math.sqrt((1.0 + t)) - math.sqrt(t)) + t_1) + ((2.0 - math.sqrt(x)) - math.sqrt(y)) else: tmp = ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + math.sqrt((1.0 + x))))) + t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) tmp = 0.0 if (y <= 0.206) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + t_1) + Float64(Float64(2.0 - sqrt(x)) - sqrt(y))); else tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + sqrt(Float64(1.0 + x))))) + t_1); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + z)) - sqrt(z);
tmp = 0.0;
if (y <= 0.206)
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + t_1) + ((2.0 - sqrt(x)) - sqrt(y));
else
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.206], N[(N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(N[(2.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z} - \sqrt{z}\\
\mathbf{if}\;y \leq 0.206:\\
\;\;\;\;\left(\left(\sqrt{1 + t} - \sqrt{t}\right) + t\_1\right) + \left(\left(2 - \sqrt{x}\right) - \sqrt{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right) + t\_1\\
\end{array}
\end{array}
if y < 0.205999999999999989Initial program 97.6%
associate-+l+97.6%
sub-neg97.6%
sub-neg97.6%
+-commutative97.6%
+-commutative97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around 0 47.7%
Taylor expanded in y around 0 47.0%
associate--r+47.0%
Simplified47.0%
if 0.205999999999999989 < y Initial program 87.6%
associate-+l+87.6%
sub-neg87.6%
sub-neg87.6%
+-commutative87.6%
+-commutative87.6%
+-commutative87.6%
Simplified87.6%
+-commutative87.6%
flip--87.8%
flip--88.1%
frac-add88.1%
Applied egg-rr89.4%
*-commutative89.4%
*-commutative89.4%
+-commutative89.4%
*-commutative89.4%
associate-/r*89.4%
Simplified93.1%
Taylor expanded in y around inf 90.8%
Taylor expanded in t around inf 43.2%
Final simplification45.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ 1.0 x))) (t_2 (sqrt (+ y 1.0))) (t_3 (sqrt (+ 1.0 z))))
(if (<= y 3.5e-45)
(+ 1.0 (+ t_2 (- t_3 (+ (sqrt x) (+ (sqrt y) (sqrt z))))))
(if (<= y 620000.0)
(- (+ (* 0.5 (sqrt (/ 1.0 z))) (+ t_2 t_1)) (+ (sqrt y) (sqrt x)))
(+
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) t_1)))
(- 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));
double t_3 = sqrt((1.0 + z));
double tmp;
if (y <= 3.5e-45) {
tmp = 1.0 + (t_2 + (t_3 - (sqrt(x) + (sqrt(y) + sqrt(z)))));
} else if (y <= 620000.0) {
tmp = ((0.5 * sqrt((1.0 / z))) + (t_2 + t_1)) - (sqrt(y) + sqrt(x));
} else {
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_1))) + (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) :: tmp
t_1 = sqrt((1.0d0 + x))
t_2 = sqrt((y + 1.0d0))
t_3 = sqrt((1.0d0 + z))
if (y <= 3.5d-45) then
tmp = 1.0d0 + (t_2 + (t_3 - (sqrt(x) + (sqrt(y) + sqrt(z)))))
else if (y <= 620000.0d0) then
tmp = ((0.5d0 * sqrt((1.0d0 / z))) + (t_2 + t_1)) - (sqrt(y) + sqrt(x))
else
tmp = ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + t_1))) + (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));
double t_3 = Math.sqrt((1.0 + z));
double tmp;
if (y <= 3.5e-45) {
tmp = 1.0 + (t_2 + (t_3 - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)))));
} else if (y <= 620000.0) {
tmp = ((0.5 * Math.sqrt((1.0 / z))) + (t_2 + t_1)) - (Math.sqrt(y) + Math.sqrt(x));
} else {
tmp = ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + t_1))) + (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)) t_3 = math.sqrt((1.0 + z)) tmp = 0 if y <= 3.5e-45: tmp = 1.0 + (t_2 + (t_3 - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))))) elif y <= 620000.0: tmp = ((0.5 * math.sqrt((1.0 / z))) + (t_2 + t_1)) - (math.sqrt(y) + math.sqrt(x)) else: tmp = ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + t_1))) + (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 = sqrt(Float64(y + 1.0)) t_3 = sqrt(Float64(1.0 + z)) tmp = 0.0 if (y <= 3.5e-45) tmp = Float64(1.0 + Float64(t_2 + Float64(t_3 - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))))); elseif (y <= 620000.0) tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + Float64(t_2 + t_1)) - Float64(sqrt(y) + sqrt(x))); else tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + t_1))) + 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));
t_3 = sqrt((1.0 + z));
tmp = 0.0;
if (y <= 3.5e-45)
tmp = 1.0 + (t_2 + (t_3 - (sqrt(x) + (sqrt(y) + sqrt(z)))));
elseif (y <= 620000.0)
tmp = ((0.5 * sqrt((1.0 / z))) + (t_2 + t_1)) - (sqrt(y) + sqrt(x));
else
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_1))) + (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[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 3.5e-45], N[(1.0 + N[(t$95$2 + N[(t$95$3 - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 620000.0], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 + t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 - N[Sqrt[z], $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}\\
t_3 := \sqrt{1 + z}\\
\mathbf{if}\;y \leq 3.5 \cdot 10^{-45}:\\
\;\;\;\;1 + \left(t\_2 + \left(t\_3 - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\right)\\
\mathbf{elif}\;y \leq 620000:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{z}} + \left(t\_2 + t\_1\right)\right) - \left(\sqrt{y} + \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_1}\right) + \left(t\_3 - \sqrt{z}\right)\\
\end{array}
\end{array}
if y < 3.5e-45Initial program 97.6%
associate-+l+97.6%
sub-neg97.6%
sub-neg97.6%
+-commutative97.6%
+-commutative97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in t around inf 20.3%
associate--l+23.8%
+-commutative23.8%
Simplified23.8%
Taylor expanded in x around 0 18.1%
associate--l+25.7%
associate--l+33.4%
Simplified33.4%
if 3.5e-45 < y < 6.2e5Initial program 97.9%
associate-+l+97.8%
sub-neg97.8%
sub-neg97.8%
+-commutative97.8%
+-commutative97.8%
+-commutative97.8%
Simplified97.8%
Taylor expanded in t around inf 24.2%
associate--l+26.3%
+-commutative26.3%
Simplified26.3%
Taylor expanded in z around inf 10.2%
associate-+r+10.2%
Simplified10.2%
if 6.2e5 < y Initial program 87.2%
associate-+l+87.2%
sub-neg87.2%
sub-neg87.2%
+-commutative87.2%
+-commutative87.2%
+-commutative87.2%
Simplified87.2%
+-commutative87.2%
flip--87.4%
flip--87.7%
frac-add87.7%
Applied egg-rr89.0%
*-commutative89.0%
*-commutative89.0%
+-commutative89.0%
*-commutative89.0%
associate-/r*89.0%
Simplified92.8%
Taylor expanded in y around inf 92.7%
Taylor expanded in t around inf 43.6%
Final simplification36.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ y 1.0))))
(if (<= z 5e+15)
(- (+ 1.0 (+ t_1 (sqrt (+ 1.0 z)))) (+ (sqrt x) (+ (sqrt y) (sqrt z))))
(+ (sqrt (+ 1.0 x)) (- t_1 (+ (sqrt y) (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));
double tmp;
if (z <= 5e+15) {
tmp = (1.0 + (t_1 + sqrt((1.0 + z)))) - (sqrt(x) + (sqrt(y) + sqrt(z)));
} else {
tmp = sqrt((1.0 + x)) + (t_1 - (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) :: t_1
real(8) :: tmp
t_1 = sqrt((y + 1.0d0))
if (z <= 5d+15) then
tmp = (1.0d0 + (t_1 + sqrt((1.0d0 + z)))) - (sqrt(x) + (sqrt(y) + sqrt(z)))
else
tmp = sqrt((1.0d0 + x)) + (t_1 - (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 t_1 = Math.sqrt((y + 1.0));
double tmp;
if (z <= 5e+15) {
tmp = (1.0 + (t_1 + Math.sqrt((1.0 + z)))) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)));
} else {
tmp = Math.sqrt((1.0 + x)) + (t_1 - (Math.sqrt(y) + 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)) tmp = 0 if z <= 5e+15: tmp = (1.0 + (t_1 + math.sqrt((1.0 + z)))) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))) else: tmp = math.sqrt((1.0 + x)) + (t_1 - (math.sqrt(y) + math.sqrt(x))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(y + 1.0)) tmp = 0.0 if (z <= 5e+15) tmp = Float64(Float64(1.0 + Float64(t_1 + sqrt(Float64(1.0 + z)))) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))); else tmp = Float64(sqrt(Float64(1.0 + x)) + Float64(t_1 - 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)
t_1 = sqrt((y + 1.0));
tmp = 0.0;
if (z <= 5e+15)
tmp = (1.0 + (t_1 + sqrt((1.0 + z)))) - (sqrt(x) + (sqrt(y) + sqrt(z)));
else
tmp = sqrt((1.0 + x)) + (t_1 - (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_] := Block[{t$95$1 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, 5e+15], N[(N[(1.0 + N[(t$95$1 + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 - 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}
t_1 := \sqrt{y + 1}\\
\mathbf{if}\;z \leq 5 \cdot 10^{+15}:\\
\;\;\;\;\left(1 + \left(t\_1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{1 + x} + \left(t\_1 - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\end{array}
\end{array}
if z < 5e15Initial program 96.5%
associate-+l+96.4%
sub-neg96.4%
sub-neg96.4%
+-commutative96.4%
+-commutative96.4%
+-commutative96.4%
Simplified96.4%
Taylor expanded in t around inf 19.9%
associate--l+23.3%
+-commutative23.3%
Simplified23.3%
Taylor expanded in x around 0 17.7%
if 5e15 < z Initial program 86.8%
associate-+l+86.8%
sub-neg86.8%
sub-neg86.8%
+-commutative86.8%
+-commutative86.8%
+-commutative86.8%
Simplified86.8%
Taylor expanded in t around inf 3.6%
associate--l+19.7%
+-commutative19.7%
Simplified19.7%
Taylor expanded in z around inf 28.9%
Final simplification22.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 (+ y 1.0))))
(if (<= z 7.2e+15)
(+ 1.0 (+ t_1 (- (sqrt (+ 1.0 z)) (+ (sqrt x) (+ (sqrt y) (sqrt z))))))
(+ (sqrt (+ 1.0 x)) (- t_1 (+ (sqrt y) (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));
double tmp;
if (z <= 7.2e+15) {
tmp = 1.0 + (t_1 + (sqrt((1.0 + z)) - (sqrt(x) + (sqrt(y) + sqrt(z)))));
} else {
tmp = sqrt((1.0 + x)) + (t_1 - (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) :: t_1
real(8) :: tmp
t_1 = sqrt((y + 1.0d0))
if (z <= 7.2d+15) then
tmp = 1.0d0 + (t_1 + (sqrt((1.0d0 + z)) - (sqrt(x) + (sqrt(y) + sqrt(z)))))
else
tmp = sqrt((1.0d0 + x)) + (t_1 - (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 t_1 = Math.sqrt((y + 1.0));
double tmp;
if (z <= 7.2e+15) {
tmp = 1.0 + (t_1 + (Math.sqrt((1.0 + z)) - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)))));
} else {
tmp = Math.sqrt((1.0 + x)) + (t_1 - (Math.sqrt(y) + 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)) tmp = 0 if z <= 7.2e+15: tmp = 1.0 + (t_1 + (math.sqrt((1.0 + z)) - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))))) else: tmp = math.sqrt((1.0 + x)) + (t_1 - (math.sqrt(y) + math.sqrt(x))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(y + 1.0)) tmp = 0.0 if (z <= 7.2e+15) tmp = Float64(1.0 + Float64(t_1 + Float64(sqrt(Float64(1.0 + z)) - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))))); else tmp = Float64(sqrt(Float64(1.0 + x)) + Float64(t_1 - 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)
t_1 = sqrt((y + 1.0));
tmp = 0.0;
if (z <= 7.2e+15)
tmp = 1.0 + (t_1 + (sqrt((1.0 + z)) - (sqrt(x) + (sqrt(y) + sqrt(z)))));
else
tmp = sqrt((1.0 + x)) + (t_1 - (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_] := Block[{t$95$1 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, 7.2e+15], N[(1.0 + N[(t$95$1 + N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 - 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}
t_1 := \sqrt{y + 1}\\
\mathbf{if}\;z \leq 7.2 \cdot 10^{+15}:\\
\;\;\;\;1 + \left(t\_1 + \left(\sqrt{1 + z} - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{1 + x} + \left(t\_1 - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\end{array}
\end{array}
if z < 7.2e15Initial program 96.5%
associate-+l+96.4%
sub-neg96.4%
sub-neg96.4%
+-commutative96.4%
+-commutative96.4%
+-commutative96.4%
Simplified96.4%
Taylor expanded in t around inf 19.9%
associate--l+23.3%
+-commutative23.3%
Simplified23.3%
Taylor expanded in x around 0 17.7%
associate--l+25.1%
associate--l+25.1%
Simplified25.1%
if 7.2e15 < z Initial program 86.8%
associate-+l+86.8%
sub-neg86.8%
sub-neg86.8%
+-commutative86.8%
+-commutative86.8%
+-commutative86.8%
Simplified86.8%
Taylor expanded in t around inf 3.6%
associate--l+19.7%
+-commutative19.7%
Simplified19.7%
Taylor expanded in z around inf 28.9%
Final simplification26.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 (<= x 1400000.0)
(+ (sqrt (+ 1.0 x)) (- (sqrt (+ y 1.0)) (+ (sqrt y) (sqrt x))))
(+
(* 0.5 (sqrt (/ 1.0 x)))
(+ (* 0.5 (sqrt (/ 1.0 z))) (* 0.5 (sqrt (/ 1.0 y)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1400000.0) {
tmp = sqrt((1.0 + x)) + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)));
} else {
tmp = (0.5 * sqrt((1.0 / x))) + ((0.5 * sqrt((1.0 / z))) + (0.5 * sqrt((1.0 / y))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= 1400000.0d0) then
tmp = sqrt((1.0d0 + x)) + (sqrt((y + 1.0d0)) - (sqrt(y) + sqrt(x)))
else
tmp = (0.5d0 * sqrt((1.0d0 / x))) + ((0.5d0 * sqrt((1.0d0 / z))) + (0.5d0 * sqrt((1.0d0 / y))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1400000.0) {
tmp = Math.sqrt((1.0 + x)) + (Math.sqrt((y + 1.0)) - (Math.sqrt(y) + Math.sqrt(x)));
} else {
tmp = (0.5 * Math.sqrt((1.0 / x))) + ((0.5 * Math.sqrt((1.0 / z))) + (0.5 * Math.sqrt((1.0 / y))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 1400000.0: tmp = math.sqrt((1.0 + x)) + (math.sqrt((y + 1.0)) - (math.sqrt(y) + math.sqrt(x))) else: tmp = (0.5 * math.sqrt((1.0 / x))) + ((0.5 * math.sqrt((1.0 / z))) + (0.5 * math.sqrt((1.0 / y)))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 1400000.0) tmp = Float64(sqrt(Float64(1.0 + x)) + Float64(sqrt(Float64(y + 1.0)) - Float64(sqrt(y) + sqrt(x)))); else tmp = Float64(Float64(0.5 * sqrt(Float64(1.0 / x))) + Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + Float64(0.5 * sqrt(Float64(1.0 / y))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= 1400000.0)
tmp = sqrt((1.0 + x)) + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)));
else
tmp = (0.5 * sqrt((1.0 / x))) + ((0.5 * sqrt((1.0 / z))) + (0.5 * sqrt((1.0 / y))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, 1400000.0], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1400000:\\
\;\;\;\;\sqrt{1 + x} + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}} + \left(0.5 \cdot \sqrt{\frac{1}{z}} + 0.5 \cdot \sqrt{\frac{1}{y}}\right)\\
\end{array}
\end{array}
if x < 1.4e6Initial program 97.0%
associate-+l+97.0%
sub-neg97.0%
sub-neg97.0%
+-commutative97.0%
+-commutative97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in t around inf 23.0%
associate--l+39.4%
+-commutative39.4%
Simplified39.4%
Taylor expanded in z around inf 34.0%
if 1.4e6 < x Initial program 88.1%
associate-+l+88.1%
sub-neg88.1%
sub-neg88.1%
+-commutative88.1%
+-commutative88.1%
+-commutative88.1%
Simplified88.1%
Taylor expanded in z around inf 40.8%
Taylor expanded in x around inf 42.5%
Taylor expanded in z around 0 21.4%
Taylor expanded in y around inf 10.8%
Final simplification21.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 (<= x 145000000.0)
(- (sqrt (+ 1.0 x)) (sqrt x))
(+
(* 0.5 (sqrt (/ 1.0 x)))
(+ (* 0.5 (sqrt (/ 1.0 z))) (* 0.5 (sqrt (/ 1.0 y)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 145000000.0) {
tmp = sqrt((1.0 + x)) - sqrt(x);
} else {
tmp = (0.5 * sqrt((1.0 / x))) + ((0.5 * sqrt((1.0 / z))) + (0.5 * sqrt((1.0 / y))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= 145000000.0d0) then
tmp = sqrt((1.0d0 + x)) - sqrt(x)
else
tmp = (0.5d0 * sqrt((1.0d0 / x))) + ((0.5d0 * sqrt((1.0d0 / z))) + (0.5d0 * sqrt((1.0d0 / y))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 145000000.0) {
tmp = Math.sqrt((1.0 + x)) - Math.sqrt(x);
} else {
tmp = (0.5 * Math.sqrt((1.0 / x))) + ((0.5 * Math.sqrt((1.0 / z))) + (0.5 * Math.sqrt((1.0 / y))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 145000000.0: tmp = math.sqrt((1.0 + x)) - math.sqrt(x) else: tmp = (0.5 * math.sqrt((1.0 / x))) + ((0.5 * math.sqrt((1.0 / z))) + (0.5 * math.sqrt((1.0 / y)))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 145000000.0) tmp = Float64(sqrt(Float64(1.0 + x)) - sqrt(x)); else tmp = Float64(Float64(0.5 * sqrt(Float64(1.0 / x))) + Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) + Float64(0.5 * sqrt(Float64(1.0 / y))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= 145000000.0)
tmp = sqrt((1.0 + x)) - sqrt(x);
else
tmp = (0.5 * sqrt((1.0 / x))) + ((0.5 * sqrt((1.0 / z))) + (0.5 * sqrt((1.0 / y))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, 145000000.0], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 145000000:\\
\;\;\;\;\sqrt{1 + x} - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}} + \left(0.5 \cdot \sqrt{\frac{1}{z}} + 0.5 \cdot \sqrt{\frac{1}{y}}\right)\\
\end{array}
\end{array}
if x < 1.45e8Initial program 96.5%
associate-+l+96.5%
sub-neg96.5%
sub-neg96.5%
+-commutative96.5%
+-commutative96.5%
+-commutative96.5%
Simplified96.5%
Taylor expanded in t around inf 22.5%
associate--l+38.7%
+-commutative38.7%
Simplified38.7%
Taylor expanded in x around inf 26.1%
mul-1-neg26.1%
Simplified26.1%
if 1.45e8 < x Initial program 88.5%
associate-+l+88.4%
sub-neg88.4%
sub-neg88.4%
+-commutative88.4%
+-commutative88.4%
+-commutative88.4%
Simplified88.4%
Taylor expanded in z around inf 40.1%
Taylor expanded in x around inf 42.1%
Taylor expanded in z around 0 21.0%
Taylor expanded in y around inf 10.2%
Final simplification18.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 (<= x 108000000.0) (- (sqrt (+ 1.0 x)) (sqrt x)) (* 0.5 (+ (sqrt (/ 1.0 z)) (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 <= 108000000.0) {
tmp = sqrt((1.0 + x)) - sqrt(x);
} else {
tmp = 0.5 * (sqrt((1.0 / z)) + 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 <= 108000000.0d0) then
tmp = sqrt((1.0d0 + x)) - sqrt(x)
else
tmp = 0.5d0 * (sqrt((1.0d0 / z)) + 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 <= 108000000.0) {
tmp = Math.sqrt((1.0 + x)) - Math.sqrt(x);
} else {
tmp = 0.5 * (Math.sqrt((1.0 / z)) + 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 <= 108000000.0: tmp = math.sqrt((1.0 + x)) - math.sqrt(x) else: tmp = 0.5 * (math.sqrt((1.0 / z)) + 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 <= 108000000.0) tmp = Float64(sqrt(Float64(1.0 + x)) - sqrt(x)); else tmp = Float64(0.5 * Float64(sqrt(Float64(1.0 / z)) + 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 <= 108000000.0)
tmp = sqrt((1.0 + x)) - sqrt(x);
else
tmp = 0.5 * (sqrt((1.0 / z)) + 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, 108000000.0], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 108000000:\\
\;\;\;\;\sqrt{1 + x} - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(\sqrt{\frac{1}{z}} + \sqrt{\frac{1}{x}}\right)\\
\end{array}
\end{array}
if x < 1.08e8Initial program 96.5%
associate-+l+96.5%
sub-neg96.5%
sub-neg96.5%
+-commutative96.5%
+-commutative96.5%
+-commutative96.5%
Simplified96.5%
Taylor expanded in t around inf 22.5%
associate--l+38.7%
+-commutative38.7%
Simplified38.7%
Taylor expanded in x around inf 26.1%
mul-1-neg26.1%
Simplified26.1%
if 1.08e8 < x Initial program 88.5%
associate-+l+88.4%
sub-neg88.4%
sub-neg88.4%
+-commutative88.4%
+-commutative88.4%
+-commutative88.4%
Simplified88.4%
Taylor expanded in z around inf 40.1%
Taylor expanded in x around inf 42.1%
Taylor expanded in z around 0 21.0%
Taylor expanded in y around inf 9.7%
distribute-lft-out9.7%
Simplified9.7%
Final simplification17.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 (<= x 56000000.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 <= 56000000.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 <= 56000000.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 <= 56000000.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 <= 56000000.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 <= 56000000.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 <= 56000000.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, 56000000.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 56000000:\\
\;\;\;\;\sqrt{1 + x} - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 5.6e7Initial program 96.5%
associate-+l+96.5%
sub-neg96.5%
sub-neg96.5%
+-commutative96.5%
+-commutative96.5%
+-commutative96.5%
Simplified96.5%
Taylor expanded in t around inf 22.5%
associate--l+38.7%
+-commutative38.7%
Simplified38.7%
Taylor expanded in x around inf 26.1%
mul-1-neg26.1%
Simplified26.1%
if 5.6e7 < x Initial program 88.5%
associate-+l+88.4%
sub-neg88.4%
sub-neg88.4%
+-commutative88.4%
+-commutative88.4%
+-commutative88.4%
Simplified88.4%
Taylor expanded in z around inf 40.1%
Taylor expanded in x around inf 42.1%
Taylor expanded in z around 0 21.0%
Taylor expanded in x around 0 8.3%
Final simplification17.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 (<= x 175.0) (+ 1.0 (* 0.5 (sqrt (/ 1.0 t)))) (* 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 <= 175.0) {
tmp = 1.0 + (0.5 * sqrt((1.0 / t)));
} 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 <= 175.0d0) then
tmp = 1.0d0 + (0.5d0 * sqrt((1.0d0 / t)))
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 <= 175.0) {
tmp = 1.0 + (0.5 * Math.sqrt((1.0 / t)));
} 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 <= 175.0: tmp = 1.0 + (0.5 * math.sqrt((1.0 / t))) 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 <= 175.0) tmp = Float64(1.0 + Float64(0.5 * sqrt(Float64(1.0 / t)))); 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 <= 175.0)
tmp = 1.0 + (0.5 * sqrt((1.0 / t)));
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, 175.0], N[(1.0 + N[(0.5 * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $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 175:\\
\;\;\;\;1 + 0.5 \cdot \sqrt{\frac{1}{t}}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 175Initial program 97.1%
associate-+l+97.1%
sub-neg97.1%
sub-neg97.1%
+-commutative97.1%
+-commutative97.1%
+-commutative97.1%
Simplified97.1%
Taylor expanded in z around 0 55.5%
Taylor expanded in t around inf 19.1%
associate--l+24.8%
associate-+r+24.9%
Simplified24.9%
Taylor expanded in t around 0 19.6%
if 175 < x Initial program 88.1%
associate-+l+88.1%
sub-neg88.1%
sub-neg88.1%
+-commutative88.1%
+-commutative88.1%
+-commutative88.1%
Simplified88.1%
Taylor expanded in z around inf 40.4%
Taylor expanded in x around inf 42.1%
Taylor expanded in z around 0 21.3%
Taylor expanded in x around 0 9.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (* 0.5 (sqrt (/ 1.0 x))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 0.5 * sqrt((1.0 / 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 = 0.5d0 * sqrt((1.0d0 / x))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 0.5 * Math.sqrt((1.0 / x));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 0.5 * math.sqrt((1.0 / x))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(0.5 * sqrt(Float64(1.0 / x))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 0.5 * sqrt((1.0 / x));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := 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])\\
\\
0.5 \cdot \sqrt{\frac{1}{x}}
\end{array}
Initial program 92.4%
associate-+l+92.4%
sub-neg92.4%
sub-neg92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
Simplified92.4%
Taylor expanded in z around inf 42.4%
Taylor expanded in x around inf 25.4%
Taylor expanded in z around 0 14.3%
Taylor expanded in x around 0 8.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (- (sqrt z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return -sqrt(z);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -sqrt(z)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return -Math.sqrt(z);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return -math.sqrt(z)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(-sqrt(z)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = -sqrt(z);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := (-N[Sqrt[z], $MachinePrecision])
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
-\sqrt{z}
\end{array}
Initial program 92.4%
associate-+l+92.4%
sub-neg92.4%
sub-neg92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
Simplified92.4%
Taylor expanded in z around 0 54.2%
Taylor expanded in z around inf 1.6%
mul-1-neg1.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 2024110
(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))))