
(FPCore (x y z t) :precision binary64 (+ (+ (+ (- (sqrt (+ x 1.0)) (sqrt x)) (- (sqrt (+ y 1.0)) (sqrt y))) (- (sqrt (+ z 1.0)) (sqrt z))) (- (sqrt (+ t 1.0)) (sqrt t))))
double code(double x, double y, double z, double t) {
return (((sqrt((x + 1.0)) - sqrt(x)) + (sqrt((y + 1.0)) - sqrt(y))) + (sqrt((z + 1.0)) - sqrt(z))) + (sqrt((t + 1.0)) - sqrt(t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((sqrt((x + 1.0d0)) - sqrt(x)) + (sqrt((y + 1.0d0)) - sqrt(y))) + (sqrt((z + 1.0d0)) - sqrt(z))) + (sqrt((t + 1.0d0)) - sqrt(t))
end function
public static double code(double x, double y, double z, double t) {
return (((Math.sqrt((x + 1.0)) - Math.sqrt(x)) + (Math.sqrt((y + 1.0)) - Math.sqrt(y))) + (Math.sqrt((z + 1.0)) - Math.sqrt(z))) + (Math.sqrt((t + 1.0)) - Math.sqrt(t));
}
def code(x, y, z, t): return (((math.sqrt((x + 1.0)) - math.sqrt(x)) + (math.sqrt((y + 1.0)) - math.sqrt(y))) + (math.sqrt((z + 1.0)) - math.sqrt(z))) + (math.sqrt((t + 1.0)) - math.sqrt(t))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(sqrt(Float64(x + 1.0)) - sqrt(x)) + Float64(sqrt(Float64(y + 1.0)) - sqrt(y))) + Float64(sqrt(Float64(z + 1.0)) - sqrt(z))) + Float64(sqrt(Float64(t + 1.0)) - sqrt(t))) end
function tmp = code(x, y, z, t) tmp = (((sqrt((x + 1.0)) - sqrt(x)) + (sqrt((y + 1.0)) - sqrt(y))) + (sqrt((z + 1.0)) - sqrt(z))) + (sqrt((t + 1.0)) - sqrt(t)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(z + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 28 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (+ (+ (- (sqrt (+ x 1.0)) (sqrt x)) (- (sqrt (+ y 1.0)) (sqrt y))) (- (sqrt (+ z 1.0)) (sqrt z))) (- (sqrt (+ t 1.0)) (sqrt t))))
double code(double x, double y, double z, double t) {
return (((sqrt((x + 1.0)) - sqrt(x)) + (sqrt((y + 1.0)) - sqrt(y))) + (sqrt((z + 1.0)) - sqrt(z))) + (sqrt((t + 1.0)) - sqrt(t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((sqrt((x + 1.0d0)) - sqrt(x)) + (sqrt((y + 1.0d0)) - sqrt(y))) + (sqrt((z + 1.0d0)) - sqrt(z))) + (sqrt((t + 1.0d0)) - sqrt(t))
end function
public static double code(double x, double y, double z, double t) {
return (((Math.sqrt((x + 1.0)) - Math.sqrt(x)) + (Math.sqrt((y + 1.0)) - Math.sqrt(y))) + (Math.sqrt((z + 1.0)) - Math.sqrt(z))) + (Math.sqrt((t + 1.0)) - Math.sqrt(t));
}
def code(x, y, z, t): return (((math.sqrt((x + 1.0)) - math.sqrt(x)) + (math.sqrt((y + 1.0)) - math.sqrt(y))) + (math.sqrt((z + 1.0)) - math.sqrt(z))) + (math.sqrt((t + 1.0)) - math.sqrt(t))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(sqrt(Float64(x + 1.0)) - sqrt(x)) + Float64(sqrt(Float64(y + 1.0)) - sqrt(y))) + Float64(sqrt(Float64(z + 1.0)) - sqrt(z))) + Float64(sqrt(Float64(t + 1.0)) - sqrt(t))) end
function tmp = code(x, y, z, t) tmp = (((sqrt((x + 1.0)) - sqrt(x)) + (sqrt((y + 1.0)) - sqrt(y))) + (sqrt((z + 1.0)) - sqrt(z))) + (sqrt((t + 1.0)) - sqrt(t)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(z + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right)
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ y 1.0)))
(t_2 (+ (sqrt y) t_1))
(t_3 (sqrt (+ 1.0 z)))
(t_4 (sqrt (+ 1.0 x)))
(t_5 (+ (sqrt x) t_4))
(t_6 (+ (sqrt z) t_3))
(t_7 (sqrt (+ 1.0 t)))
(t_8 (+ t_7 (sqrt t))))
(if (<= (- t_3 (sqrt z)) 3e-6)
(+
(/ (+ t_2 t_5) (* t_2 t_5))
(+ (- t_7 (sqrt t)) (* 0.5 (sqrt (/ 1.0 z)))))
(+ (- t_4 (sqrt x)) (+ (- t_1 (sqrt y)) (/ (+ t_6 t_8) (* t_6 t_8)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((y + 1.0));
double t_2 = sqrt(y) + t_1;
double t_3 = sqrt((1.0 + z));
double t_4 = sqrt((1.0 + x));
double t_5 = sqrt(x) + t_4;
double t_6 = sqrt(z) + t_3;
double t_7 = sqrt((1.0 + t));
double t_8 = t_7 + sqrt(t);
double tmp;
if ((t_3 - sqrt(z)) <= 3e-6) {
tmp = ((t_2 + t_5) / (t_2 * t_5)) + ((t_7 - sqrt(t)) + (0.5 * sqrt((1.0 / z))));
} else {
tmp = (t_4 - sqrt(x)) + ((t_1 - sqrt(y)) + ((t_6 + t_8) / (t_6 * t_8)));
}
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) :: t_7
real(8) :: t_8
real(8) :: tmp
t_1 = sqrt((y + 1.0d0))
t_2 = sqrt(y) + t_1
t_3 = sqrt((1.0d0 + z))
t_4 = sqrt((1.0d0 + x))
t_5 = sqrt(x) + t_4
t_6 = sqrt(z) + t_3
t_7 = sqrt((1.0d0 + t))
t_8 = t_7 + sqrt(t)
if ((t_3 - sqrt(z)) <= 3d-6) then
tmp = ((t_2 + t_5) / (t_2 * t_5)) + ((t_7 - sqrt(t)) + (0.5d0 * sqrt((1.0d0 / z))))
else
tmp = (t_4 - sqrt(x)) + ((t_1 - sqrt(y)) + ((t_6 + t_8) / (t_6 * t_8)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((y + 1.0));
double t_2 = Math.sqrt(y) + t_1;
double t_3 = Math.sqrt((1.0 + z));
double t_4 = Math.sqrt((1.0 + x));
double t_5 = Math.sqrt(x) + t_4;
double t_6 = Math.sqrt(z) + t_3;
double t_7 = Math.sqrt((1.0 + t));
double t_8 = t_7 + Math.sqrt(t);
double tmp;
if ((t_3 - Math.sqrt(z)) <= 3e-6) {
tmp = ((t_2 + t_5) / (t_2 * t_5)) + ((t_7 - Math.sqrt(t)) + (0.5 * Math.sqrt((1.0 / z))));
} else {
tmp = (t_4 - Math.sqrt(x)) + ((t_1 - Math.sqrt(y)) + ((t_6 + t_8) / (t_6 * t_8)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((y + 1.0)) t_2 = math.sqrt(y) + t_1 t_3 = math.sqrt((1.0 + z)) t_4 = math.sqrt((1.0 + x)) t_5 = math.sqrt(x) + t_4 t_6 = math.sqrt(z) + t_3 t_7 = math.sqrt((1.0 + t)) t_8 = t_7 + math.sqrt(t) tmp = 0 if (t_3 - math.sqrt(z)) <= 3e-6: tmp = ((t_2 + t_5) / (t_2 * t_5)) + ((t_7 - math.sqrt(t)) + (0.5 * math.sqrt((1.0 / z)))) else: tmp = (t_4 - math.sqrt(x)) + ((t_1 - math.sqrt(y)) + ((t_6 + t_8) / (t_6 * t_8))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(y + 1.0)) t_2 = Float64(sqrt(y) + t_1) t_3 = sqrt(Float64(1.0 + z)) t_4 = sqrt(Float64(1.0 + x)) t_5 = Float64(sqrt(x) + t_4) t_6 = Float64(sqrt(z) + t_3) t_7 = sqrt(Float64(1.0 + t)) t_8 = Float64(t_7 + sqrt(t)) tmp = 0.0 if (Float64(t_3 - sqrt(z)) <= 3e-6) tmp = Float64(Float64(Float64(t_2 + t_5) / Float64(t_2 * t_5)) + Float64(Float64(t_7 - sqrt(t)) + Float64(0.5 * sqrt(Float64(1.0 / z))))); else tmp = Float64(Float64(t_4 - sqrt(x)) + Float64(Float64(t_1 - sqrt(y)) + Float64(Float64(t_6 + t_8) / Float64(t_6 * t_8)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((y + 1.0));
t_2 = sqrt(y) + t_1;
t_3 = sqrt((1.0 + z));
t_4 = sqrt((1.0 + x));
t_5 = sqrt(x) + t_4;
t_6 = sqrt(z) + t_3;
t_7 = sqrt((1.0 + t));
t_8 = t_7 + sqrt(t);
tmp = 0.0;
if ((t_3 - sqrt(z)) <= 3e-6)
tmp = ((t_2 + t_5) / (t_2 * t_5)) + ((t_7 - sqrt(t)) + (0.5 * sqrt((1.0 / z))));
else
tmp = (t_4 - sqrt(x)) + ((t_1 - sqrt(y)) + ((t_6 + t_8) / (t_6 * t_8)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[y], $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[Sqrt[x], $MachinePrecision] + t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[Sqrt[z], $MachinePrecision] + t$95$3), $MachinePrecision]}, Block[{t$95$7 = N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$8 = N[(t$95$7 + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$3 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision], 3e-6], N[(N[(N[(t$95$2 + t$95$5), $MachinePrecision] / N[(t$95$2 * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$7 - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$4 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$6 + t$95$8), $MachinePrecision] / N[(t$95$6 * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{y + 1}\\
t_2 := \sqrt{y} + t\_1\\
t_3 := \sqrt{1 + z}\\
t_4 := \sqrt{1 + x}\\
t_5 := \sqrt{x} + t\_4\\
t_6 := \sqrt{z} + t\_3\\
t_7 := \sqrt{1 + t}\\
t_8 := t\_7 + \sqrt{t}\\
\mathbf{if}\;t\_3 - \sqrt{z} \leq 3 \cdot 10^{-6}:\\
\;\;\;\;\frac{t\_2 + t\_5}{t\_2 \cdot t\_5} + \left(\left(t\_7 - \sqrt{t}\right) + 0.5 \cdot \sqrt{\frac{1}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_4 - \sqrt{x}\right) + \left(\left(t\_1 - \sqrt{y}\right) + \frac{t\_6 + t\_8}{t\_6 \cdot t\_8}\right)\\
\end{array}
\end{array}
if (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)) < 3.0000000000000001e-6Initial program 83.6%
associate-+l+83.6%
associate-+l-67.9%
associate-+l-83.6%
+-commutative83.6%
+-commutative83.6%
+-commutative83.6%
Simplified83.6%
+-commutative83.6%
flip--83.9%
flip--83.9%
frac-add83.9%
Applied egg-rr84.5%
Simplified90.1%
Taylor expanded in z around inf 96.1%
if 3.0000000000000001e-6 < (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)) Initial program 96.4%
associate-+l+96.4%
associate-+l+96.4%
+-commutative96.4%
+-commutative96.4%
associate-+l-60.7%
+-commutative60.7%
+-commutative60.7%
Simplified60.7%
associate--r-96.4%
flip--96.8%
flip--96.8%
frac-add96.8%
Applied egg-rr97.6%
Simplified97.9%
Final simplification97.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ 1.0 z)))
(t_2 (- t_1 (sqrt z)))
(t_3 (sqrt (+ y 1.0)))
(t_4 (sqrt (+ 1.0 x)))
(t_5 (- (sqrt (+ 1.0 t)) (sqrt t))))
(if (<= (+ (+ (- t_4 (sqrt x)) (- t_3 (sqrt y))) t_2) 0.995)
(+
(+
(* -0.125 (sqrt (/ 1.0 (pow y 3.0))))
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) t_4))))
(+ t_5 t_2))
(+
(+ (/ 1.0 (+ (sqrt z) t_1)) t_5)
(+
(+ 1.0 (- (* x (+ 0.5 (* x -0.125))) (sqrt x)))
(/ 1.0 (+ (sqrt y) t_3)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + z));
double t_2 = t_1 - sqrt(z);
double t_3 = sqrt((y + 1.0));
double t_4 = sqrt((1.0 + x));
double t_5 = sqrt((1.0 + t)) - sqrt(t);
double tmp;
if ((((t_4 - sqrt(x)) + (t_3 - sqrt(y))) + t_2) <= 0.995) {
tmp = ((-0.125 * sqrt((1.0 / pow(y, 3.0)))) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_4)))) + (t_5 + t_2);
} else {
tmp = ((1.0 / (sqrt(z) + t_1)) + t_5) + ((1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))) + (1.0 / (sqrt(y) + t_3)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = sqrt((1.0d0 + z))
t_2 = t_1 - sqrt(z)
t_3 = sqrt((y + 1.0d0))
t_4 = sqrt((1.0d0 + x))
t_5 = sqrt((1.0d0 + t)) - sqrt(t)
if ((((t_4 - sqrt(x)) + (t_3 - sqrt(y))) + t_2) <= 0.995d0) then
tmp = (((-0.125d0) * sqrt((1.0d0 / (y ** 3.0d0)))) + ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + t_4)))) + (t_5 + t_2)
else
tmp = ((1.0d0 / (sqrt(z) + t_1)) + t_5) + ((1.0d0 + ((x * (0.5d0 + (x * (-0.125d0)))) - sqrt(x))) + (1.0d0 / (sqrt(y) + t_3)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + z));
double t_2 = t_1 - Math.sqrt(z);
double t_3 = Math.sqrt((y + 1.0));
double t_4 = Math.sqrt((1.0 + x));
double t_5 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double tmp;
if ((((t_4 - Math.sqrt(x)) + (t_3 - Math.sqrt(y))) + t_2) <= 0.995) {
tmp = ((-0.125 * Math.sqrt((1.0 / Math.pow(y, 3.0)))) + ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + t_4)))) + (t_5 + t_2);
} else {
tmp = ((1.0 / (Math.sqrt(z) + t_1)) + t_5) + ((1.0 + ((x * (0.5 + (x * -0.125))) - Math.sqrt(x))) + (1.0 / (Math.sqrt(y) + t_3)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + z)) t_2 = t_1 - math.sqrt(z) t_3 = math.sqrt((y + 1.0)) t_4 = math.sqrt((1.0 + x)) t_5 = math.sqrt((1.0 + t)) - math.sqrt(t) tmp = 0 if (((t_4 - math.sqrt(x)) + (t_3 - math.sqrt(y))) + t_2) <= 0.995: tmp = ((-0.125 * math.sqrt((1.0 / math.pow(y, 3.0)))) + ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + t_4)))) + (t_5 + t_2) else: tmp = ((1.0 / (math.sqrt(z) + t_1)) + t_5) + ((1.0 + ((x * (0.5 + (x * -0.125))) - math.sqrt(x))) + (1.0 / (math.sqrt(y) + t_3))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 + z)) t_2 = Float64(t_1 - sqrt(z)) t_3 = sqrt(Float64(y + 1.0)) t_4 = sqrt(Float64(1.0 + x)) t_5 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) tmp = 0.0 if (Float64(Float64(Float64(t_4 - sqrt(x)) + Float64(t_3 - sqrt(y))) + t_2) <= 0.995) tmp = Float64(Float64(Float64(-0.125 * sqrt(Float64(1.0 / (y ^ 3.0)))) + Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + t_4)))) + Float64(t_5 + t_2)); else tmp = Float64(Float64(Float64(1.0 / Float64(sqrt(z) + t_1)) + t_5) + Float64(Float64(1.0 + Float64(Float64(x * Float64(0.5 + Float64(x * -0.125))) - sqrt(x))) + Float64(1.0 / Float64(sqrt(y) + t_3)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + z));
t_2 = t_1 - sqrt(z);
t_3 = sqrt((y + 1.0));
t_4 = sqrt((1.0 + x));
t_5 = sqrt((1.0 + t)) - sqrt(t);
tmp = 0.0;
if ((((t_4 - sqrt(x)) + (t_3 - sqrt(y))) + t_2) <= 0.995)
tmp = ((-0.125 * sqrt((1.0 / (y ^ 3.0)))) + ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_4)))) + (t_5 + t_2);
else
tmp = ((1.0 / (sqrt(z) + t_1)) + t_5) + ((1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))) + (1.0 / (sqrt(y) + t_3)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(t$95$4 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(t$95$3 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], 0.995], N[(N[(N[(-0.125 * N[Sqrt[N[(1.0 / N[Power[y, 3.0], $MachinePrecision]), $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$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision] + N[(N[(1.0 + N[(N[(x * N[(0.5 + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z}\\
t_2 := t\_1 - \sqrt{z}\\
t_3 := \sqrt{y + 1}\\
t_4 := \sqrt{1 + x}\\
t_5 := \sqrt{1 + t} - \sqrt{t}\\
\mathbf{if}\;\left(\left(t\_4 - \sqrt{x}\right) + \left(t\_3 - \sqrt{y}\right)\right) + t\_2 \leq 0.995:\\
\;\;\;\;\left(-0.125 \cdot \sqrt{\frac{1}{{y}^{3}}} + \left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_4}\right)\right) + \left(t\_5 + t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sqrt{z} + t\_1} + t\_5\right) + \left(\left(1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\right) + \frac{1}{\sqrt{y} + t\_3}\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) < 0.994999999999999996Initial program 55.9%
associate-+l+55.9%
associate-+l-53.3%
associate-+l-55.9%
+-commutative55.9%
+-commutative55.9%
+-commutative55.9%
Simplified55.9%
+-commutative55.9%
flip--56.2%
flip--56.2%
frac-add56.2%
Applied egg-rr57.7%
Simplified74.8%
Taylor expanded in y around inf 74.1%
if 0.994999999999999996 < (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) Initial program 96.5%
associate-+l+96.5%
associate-+l-79.7%
associate-+l-96.5%
+-commutative96.5%
+-commutative96.5%
+-commutative96.5%
Simplified96.5%
Taylor expanded in x around 0 60.2%
associate--l+60.2%
Simplified60.2%
flip--60.5%
add-sqr-sqrt47.3%
add-sqr-sqrt60.7%
Applied egg-rr60.7%
associate--l+60.8%
+-inverses60.8%
metadata-eval60.8%
+-commutative60.8%
Simplified60.8%
flip--97.9%
add-sqr-sqrt80.8%
add-sqr-sqrt98.2%
Applied egg-rr61.0%
associate--l+98.8%
+-inverses98.8%
metadata-eval98.8%
+-commutative98.8%
Simplified61.5%
Final simplification63.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (sqrt (+ 1.0 t)) (sqrt t)))
(t_2 (sqrt (+ 1.0 z)))
(t_3 (- t_2 (sqrt z)))
(t_4 (sqrt (+ 1.0 x)))
(t_5 (sqrt (+ y 1.0))))
(if (<= (+ (+ (- t_4 (sqrt x)) (- t_5 (sqrt y))) t_3) 0.995)
(+ (+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) t_4))) (+ t_1 t_3))
(+
(+ (/ 1.0 (+ (sqrt z) t_2)) t_1)
(+
(+ 1.0 (- (* x (+ 0.5 (* x -0.125))) (sqrt x)))
(/ 1.0 (+ (sqrt y) t_5)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + t)) - sqrt(t);
double t_2 = sqrt((1.0 + z));
double t_3 = t_2 - sqrt(z);
double t_4 = sqrt((1.0 + x));
double t_5 = sqrt((y + 1.0));
double tmp;
if ((((t_4 - sqrt(x)) + (t_5 - sqrt(y))) + t_3) <= 0.995) {
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_4))) + (t_1 + t_3);
} else {
tmp = ((1.0 / (sqrt(z) + t_2)) + t_1) + ((1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))) + (1.0 / (sqrt(y) + t_5)));
}
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) :: tmp
t_1 = sqrt((1.0d0 + t)) - sqrt(t)
t_2 = sqrt((1.0d0 + z))
t_3 = t_2 - sqrt(z)
t_4 = sqrt((1.0d0 + x))
t_5 = sqrt((y + 1.0d0))
if ((((t_4 - sqrt(x)) + (t_5 - sqrt(y))) + t_3) <= 0.995d0) then
tmp = ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + t_4))) + (t_1 + t_3)
else
tmp = ((1.0d0 / (sqrt(z) + t_2)) + t_1) + ((1.0d0 + ((x * (0.5d0 + (x * (-0.125d0)))) - sqrt(x))) + (1.0d0 / (sqrt(y) + t_5)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double t_2 = Math.sqrt((1.0 + z));
double t_3 = t_2 - Math.sqrt(z);
double t_4 = Math.sqrt((1.0 + x));
double t_5 = Math.sqrt((y + 1.0));
double tmp;
if ((((t_4 - Math.sqrt(x)) + (t_5 - Math.sqrt(y))) + t_3) <= 0.995) {
tmp = ((0.5 * Math.sqrt((1.0 / y))) + (1.0 / (Math.sqrt(x) + t_4))) + (t_1 + t_3);
} else {
tmp = ((1.0 / (Math.sqrt(z) + t_2)) + t_1) + ((1.0 + ((x * (0.5 + (x * -0.125))) - Math.sqrt(x))) + (1.0 / (Math.sqrt(y) + t_5)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + t)) - math.sqrt(t) t_2 = math.sqrt((1.0 + z)) t_3 = t_2 - math.sqrt(z) t_4 = math.sqrt((1.0 + x)) t_5 = math.sqrt((y + 1.0)) tmp = 0 if (((t_4 - math.sqrt(x)) + (t_5 - math.sqrt(y))) + t_3) <= 0.995: tmp = ((0.5 * math.sqrt((1.0 / y))) + (1.0 / (math.sqrt(x) + t_4))) + (t_1 + t_3) else: tmp = ((1.0 / (math.sqrt(z) + t_2)) + t_1) + ((1.0 + ((x * (0.5 + (x * -0.125))) - math.sqrt(x))) + (1.0 / (math.sqrt(y) + t_5))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) t_2 = sqrt(Float64(1.0 + z)) t_3 = Float64(t_2 - sqrt(z)) t_4 = sqrt(Float64(1.0 + x)) t_5 = sqrt(Float64(y + 1.0)) tmp = 0.0 if (Float64(Float64(Float64(t_4 - sqrt(x)) + Float64(t_5 - sqrt(y))) + t_3) <= 0.995) tmp = Float64(Float64(Float64(0.5 * sqrt(Float64(1.0 / y))) + Float64(1.0 / Float64(sqrt(x) + t_4))) + Float64(t_1 + t_3)); else tmp = Float64(Float64(Float64(1.0 / Float64(sqrt(z) + t_2)) + t_1) + Float64(Float64(1.0 + Float64(Float64(x * Float64(0.5 + Float64(x * -0.125))) - sqrt(x))) + Float64(1.0 / Float64(sqrt(y) + t_5)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + t)) - sqrt(t);
t_2 = sqrt((1.0 + z));
t_3 = t_2 - sqrt(z);
t_4 = sqrt((1.0 + x));
t_5 = sqrt((y + 1.0));
tmp = 0.0;
if ((((t_4 - sqrt(x)) + (t_5 - sqrt(y))) + t_3) <= 0.995)
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + t_4))) + (t_1 + t_3);
else
tmp = ((1.0 / (sqrt(z) + t_2)) + t_1) + ((1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))) + (1.0 / (sqrt(y) + t_5)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(t$95$4 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(t$95$5 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], 0.995], N[(N[(N[(0.5 * N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + t$95$3), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(N[(1.0 + N[(N[(x * N[(0.5 + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + t} - \sqrt{t}\\
t_2 := \sqrt{1 + z}\\
t_3 := t\_2 - \sqrt{z}\\
t_4 := \sqrt{1 + x}\\
t_5 := \sqrt{y + 1}\\
\mathbf{if}\;\left(\left(t\_4 - \sqrt{x}\right) + \left(t\_5 - \sqrt{y}\right)\right) + t\_3 \leq 0.995:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + t\_4}\right) + \left(t\_1 + t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sqrt{z} + t\_2} + t\_1\right) + \left(\left(1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\right) + \frac{1}{\sqrt{y} + t\_5}\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) < 0.994999999999999996Initial program 55.9%
associate-+l+55.9%
associate-+l-53.3%
associate-+l-55.9%
+-commutative55.9%
+-commutative55.9%
+-commutative55.9%
Simplified55.9%
+-commutative55.9%
flip--56.2%
flip--56.2%
frac-add56.2%
Applied egg-rr57.7%
Simplified74.8%
Taylor expanded in y around inf 72.8%
if 0.994999999999999996 < (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) Initial program 96.5%
associate-+l+96.5%
associate-+l-79.7%
associate-+l-96.5%
+-commutative96.5%
+-commutative96.5%
+-commutative96.5%
Simplified96.5%
Taylor expanded in x around 0 60.2%
associate--l+60.2%
Simplified60.2%
flip--60.5%
add-sqr-sqrt47.3%
add-sqr-sqrt60.7%
Applied egg-rr60.7%
associate--l+60.8%
+-inverses60.8%
metadata-eval60.8%
+-commutative60.8%
Simplified60.8%
flip--97.9%
add-sqr-sqrt80.8%
add-sqr-sqrt98.2%
Applied egg-rr61.0%
associate--l+98.8%
+-inverses98.8%
metadata-eval98.8%
+-commutative98.8%
Simplified61.5%
Final simplification63.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 (+ y 1.0)))
(t_2 (+ (sqrt y) t_1))
(t_3 (- (sqrt (+ 1.0 z)) (sqrt z)))
(t_4 (sqrt (+ 1.0 x)))
(t_5 (+ (sqrt x) t_4))
(t_6 (sqrt (+ 1.0 t))))
(if (<= t_3 0.0001)
(+
(/ (+ t_2 t_5) (* t_2 t_5))
(+ (- t_6 (sqrt t)) (* 0.5 (sqrt (/ 1.0 z)))))
(+
(+ (- t_4 (sqrt x)) (- t_1 (sqrt y)))
(+ t_3 (/ 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((y + 1.0));
double t_2 = sqrt(y) + t_1;
double t_3 = sqrt((1.0 + z)) - sqrt(z);
double t_4 = sqrt((1.0 + x));
double t_5 = sqrt(x) + t_4;
double t_6 = sqrt((1.0 + t));
double tmp;
if (t_3 <= 0.0001) {
tmp = ((t_2 + t_5) / (t_2 * t_5)) + ((t_6 - sqrt(t)) + (0.5 * sqrt((1.0 / z))));
} else {
tmp = ((t_4 - sqrt(x)) + (t_1 - sqrt(y))) + (t_3 + (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((y + 1.0d0))
t_2 = sqrt(y) + t_1
t_3 = sqrt((1.0d0 + z)) - sqrt(z)
t_4 = sqrt((1.0d0 + x))
t_5 = sqrt(x) + t_4
t_6 = sqrt((1.0d0 + t))
if (t_3 <= 0.0001d0) then
tmp = ((t_2 + t_5) / (t_2 * t_5)) + ((t_6 - sqrt(t)) + (0.5d0 * sqrt((1.0d0 / z))))
else
tmp = ((t_4 - sqrt(x)) + (t_1 - sqrt(y))) + (t_3 + (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((y + 1.0));
double t_2 = Math.sqrt(y) + t_1;
double t_3 = Math.sqrt((1.0 + z)) - Math.sqrt(z);
double t_4 = Math.sqrt((1.0 + x));
double t_5 = Math.sqrt(x) + t_4;
double t_6 = Math.sqrt((1.0 + t));
double tmp;
if (t_3 <= 0.0001) {
tmp = ((t_2 + t_5) / (t_2 * t_5)) + ((t_6 - Math.sqrt(t)) + (0.5 * Math.sqrt((1.0 / z))));
} else {
tmp = ((t_4 - Math.sqrt(x)) + (t_1 - Math.sqrt(y))) + (t_3 + (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((y + 1.0)) t_2 = math.sqrt(y) + t_1 t_3 = math.sqrt((1.0 + z)) - math.sqrt(z) t_4 = math.sqrt((1.0 + x)) t_5 = math.sqrt(x) + t_4 t_6 = math.sqrt((1.0 + t)) tmp = 0 if t_3 <= 0.0001: tmp = ((t_2 + t_5) / (t_2 * t_5)) + ((t_6 - math.sqrt(t)) + (0.5 * math.sqrt((1.0 / z)))) else: tmp = ((t_4 - math.sqrt(x)) + (t_1 - math.sqrt(y))) + (t_3 + (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(y + 1.0)) t_2 = Float64(sqrt(y) + t_1) t_3 = Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) t_4 = sqrt(Float64(1.0 + x)) t_5 = Float64(sqrt(x) + t_4) t_6 = sqrt(Float64(1.0 + t)) tmp = 0.0 if (t_3 <= 0.0001) tmp = Float64(Float64(Float64(t_2 + t_5) / Float64(t_2 * t_5)) + Float64(Float64(t_6 - sqrt(t)) + Float64(0.5 * sqrt(Float64(1.0 / z))))); else tmp = Float64(Float64(Float64(t_4 - sqrt(x)) + Float64(t_1 - sqrt(y))) + Float64(t_3 + 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((y + 1.0));
t_2 = sqrt(y) + t_1;
t_3 = sqrt((1.0 + z)) - sqrt(z);
t_4 = sqrt((1.0 + x));
t_5 = sqrt(x) + t_4;
t_6 = sqrt((1.0 + t));
tmp = 0.0;
if (t_3 <= 0.0001)
tmp = ((t_2 + t_5) / (t_2 * t_5)) + ((t_6 - sqrt(t)) + (0.5 * sqrt((1.0 / z))));
else
tmp = ((t_4 - sqrt(x)) + (t_1 - sqrt(y))) + (t_3 + (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[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[y], $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[Sqrt[x], $MachinePrecision] + t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0001], N[(N[(N[(t$95$2 + t$95$5), $MachinePrecision] / N[(t$95$2 * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$6 - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$4 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 + 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{y + 1}\\
t_2 := \sqrt{y} + t\_1\\
t_3 := \sqrt{1 + z} - \sqrt{z}\\
t_4 := \sqrt{1 + x}\\
t_5 := \sqrt{x} + t\_4\\
t_6 := \sqrt{1 + t}\\
\mathbf{if}\;t\_3 \leq 0.0001:\\
\;\;\;\;\frac{t\_2 + t\_5}{t\_2 \cdot t\_5} + \left(\left(t\_6 - \sqrt{t}\right) + 0.5 \cdot \sqrt{\frac{1}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t\_4 - \sqrt{x}\right) + \left(t\_1 - \sqrt{y}\right)\right) + \left(t\_3 + \frac{1}{t\_6 + \sqrt{t}}\right)\\
\end{array}
\end{array}
if (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)) < 1.00000000000000005e-4Initial program 83.4%
associate-+l+83.4%
associate-+l-67.8%
associate-+l-83.4%
+-commutative83.4%
+-commutative83.4%
+-commutative83.4%
Simplified83.4%
+-commutative83.4%
flip--83.7%
flip--83.7%
frac-add83.7%
Applied egg-rr84.3%
Simplified89.8%
Taylor expanded in z around inf 95.8%
if 1.00000000000000005e-4 < (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)) Initial program 96.7%
associate-+l+96.7%
associate-+l-82.8%
associate-+l-96.7%
+-commutative96.7%
+-commutative96.7%
+-commutative96.7%
Simplified96.7%
flip--97.1%
add-sqr-sqrt71.6%
add-sqr-sqrt97.5%
Applied egg-rr97.5%
associate--l+97.8%
+-inverses97.8%
metadata-eval97.8%
+-commutative97.8%
Simplified97.8%
Final simplification96.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (sqrt y) (sqrt (+ y 1.0))))
(t_2 (+ (sqrt x) (sqrt (+ 1.0 x)))))
(+
(/ (+ t_1 t_2) (* t_1 t_2))
(+ (/ 1.0 (+ (sqrt z) (sqrt (+ 1.0 z)))) (- (sqrt (+ 1.0 t)) (sqrt t))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt(y) + sqrt((y + 1.0));
double t_2 = sqrt(x) + sqrt((1.0 + x));
return ((t_1 + t_2) / (t_1 * t_2)) + ((1.0 / (sqrt(z) + sqrt((1.0 + z)))) + (sqrt((1.0 + t)) - sqrt(t)));
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
t_1 = sqrt(y) + sqrt((y + 1.0d0))
t_2 = sqrt(x) + sqrt((1.0d0 + x))
code = ((t_1 + t_2) / (t_1 * t_2)) + ((1.0d0 / (sqrt(z) + sqrt((1.0d0 + z)))) + (sqrt((1.0d0 + t)) - sqrt(t)))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt(y) + Math.sqrt((y + 1.0));
double t_2 = Math.sqrt(x) + Math.sqrt((1.0 + x));
return ((t_1 + t_2) / (t_1 * t_2)) + ((1.0 / (Math.sqrt(z) + Math.sqrt((1.0 + z)))) + (Math.sqrt((1.0 + t)) - Math.sqrt(t)));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt(y) + math.sqrt((y + 1.0)) t_2 = math.sqrt(x) + math.sqrt((1.0 + x)) return ((t_1 + t_2) / (t_1 * t_2)) + ((1.0 / (math.sqrt(z) + math.sqrt((1.0 + z)))) + (math.sqrt((1.0 + t)) - math.sqrt(t)))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(y) + sqrt(Float64(y + 1.0))) t_2 = Float64(sqrt(x) + sqrt(Float64(1.0 + x))) return Float64(Float64(Float64(t_1 + t_2) / Float64(t_1 * t_2)) + Float64(Float64(1.0 / Float64(sqrt(z) + sqrt(Float64(1.0 + z)))) + Float64(sqrt(Float64(1.0 + t)) - sqrt(t)))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
t_1 = sqrt(y) + sqrt((y + 1.0));
t_2 = sqrt(x) + sqrt((1.0 + x));
tmp = ((t_1 + t_2) / (t_1 * t_2)) + ((1.0 / (sqrt(z) + sqrt((1.0 + z)))) + (sqrt((1.0 + t)) - sqrt(t)));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(t$95$1 + t$95$2), $MachinePrecision] / N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{y} + \sqrt{y + 1}\\
t_2 := \sqrt{x} + \sqrt{1 + x}\\
\frac{t\_1 + t\_2}{t\_1 \cdot t\_2} + \left(\frac{1}{\sqrt{z} + \sqrt{1 + z}} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right)
\end{array}
\end{array}
Initial program 90.3%
associate-+l+90.3%
associate-+l-75.7%
associate-+l-90.3%
+-commutative90.3%
+-commutative90.3%
+-commutative90.3%
Simplified90.3%
+-commutative90.3%
flip--90.6%
flip--90.6%
frac-add90.6%
Applied egg-rr91.4%
Simplified94.4%
flip--94.4%
add-sqr-sqrt75.9%
add-sqr-sqrt94.7%
Applied egg-rr94.7%
associate--l+97.3%
+-inverses97.3%
metadata-eval97.3%
+-commutative97.3%
Simplified97.3%
Final simplification97.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))) (t_2 (sqrt (+ 1.0 z))))
(if (<= y 25500000.0)
(+
(+ (/ 1.0 (+ (sqrt z) t_2)) t_1)
(- (+ 1.0 (sqrt (+ y 1.0))) (+ (sqrt y) (sqrt x))))
(+
(+ (* 0.5 (sqrt (/ 1.0 y))) (/ 1.0 (+ (sqrt x) (sqrt (+ 1.0 x)))))
(+ t_1 (- t_2 (sqrt z)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + t)) - sqrt(t);
double t_2 = sqrt((1.0 + z));
double tmp;
if (y <= 25500000.0) {
tmp = ((1.0 / (sqrt(z) + t_2)) + t_1) + ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x)));
} else {
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))) + (t_1 + (t_2 - sqrt(z)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((1.0d0 + t)) - sqrt(t)
t_2 = sqrt((1.0d0 + z))
if (y <= 25500000.0d0) then
tmp = ((1.0d0 / (sqrt(z) + t_2)) + t_1) + ((1.0d0 + sqrt((y + 1.0d0))) - (sqrt(y) + sqrt(x)))
else
tmp = ((0.5d0 * sqrt((1.0d0 / y))) + (1.0d0 / (sqrt(x) + sqrt((1.0d0 + x))))) + (t_1 + (t_2 - sqrt(z)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double t_2 = Math.sqrt((1.0 + z));
double tmp;
if (y <= 25500000.0) {
tmp = ((1.0 / (Math.sqrt(z) + t_2)) + t_1) + ((1.0 + Math.sqrt((y + 1.0))) - (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 + (t_2 - Math.sqrt(z)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + t)) - math.sqrt(t) t_2 = math.sqrt((1.0 + z)) tmp = 0 if y <= 25500000.0: tmp = ((1.0 / (math.sqrt(z) + t_2)) + t_1) + ((1.0 + math.sqrt((y + 1.0))) - (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 + (t_2 - math.sqrt(z))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) t_2 = sqrt(Float64(1.0 + z)) tmp = 0.0 if (y <= 25500000.0) tmp = Float64(Float64(Float64(1.0 / Float64(sqrt(z) + t_2)) + t_1) + Float64(Float64(1.0 + sqrt(Float64(y + 1.0))) - 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))))) + Float64(t_1 + Float64(t_2 - sqrt(z)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + t)) - sqrt(t);
t_2 = sqrt((1.0 + z));
tmp = 0.0;
if (y <= 25500000.0)
tmp = ((1.0 / (sqrt(z) + t_2)) + t_1) + ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x)));
else
tmp = ((0.5 * sqrt((1.0 / y))) + (1.0 / (sqrt(x) + sqrt((1.0 + x))))) + (t_1 + (t_2 - sqrt(z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 25500000.0], N[(N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(N[(1.0 + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $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] + N[(t$95$1 + N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + t} - \sqrt{t}\\
t_2 := \sqrt{1 + z}\\
\mathbf{if}\;y \leq 25500000:\\
\;\;\;\;\left(\frac{1}{\sqrt{z} + t\_2} + t\_1\right) + \left(\left(1 + \sqrt{y + 1}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sqrt{\frac{1}{y}} + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\right) + \left(t\_1 + \left(t\_2 - \sqrt{z}\right)\right)\\
\end{array}
\end{array}
if y < 2.55e7Initial program 96.9%
associate-+l+96.9%
associate-+l-66.6%
associate-+l-96.9%
+-commutative96.9%
+-commutative96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in x around 0 54.7%
+-commutative54.7%
Simplified54.7%
flip--97.9%
add-sqr-sqrt74.7%
add-sqr-sqrt97.9%
Applied egg-rr54.7%
associate--l+98.8%
+-inverses98.8%
metadata-eval98.8%
+-commutative98.8%
Simplified55.4%
if 2.55e7 < y Initial program 84.4%
associate-+l+84.4%
associate-+l-83.8%
associate-+l-84.4%
+-commutative84.4%
+-commutative84.4%
+-commutative84.4%
Simplified84.4%
+-commutative84.4%
flip--84.9%
flip--84.9%
frac-add84.9%
Applied egg-rr85.8%
Simplified91.3%
Taylor expanded in y around inf 91.2%
Final simplification74.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ 1.0 z))))
(if (<= y 6.2e+16)
(+
(+ (/ 1.0 (+ (sqrt z) t_1)) (- (sqrt (+ 1.0 t)) (sqrt t)))
(- (+ 1.0 (sqrt (+ y 1.0))) (+ (sqrt y) (sqrt x))))
(+ (- t_1 (sqrt z)) (/ 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 + z));
double tmp;
if (y <= 6.2e+16) {
tmp = ((1.0 / (sqrt(z) + t_1)) + (sqrt((1.0 + t)) - sqrt(t))) + ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x)));
} else {
tmp = (t_1 - sqrt(z)) + (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 + z))
if (y <= 6.2d+16) then
tmp = ((1.0d0 / (sqrt(z) + t_1)) + (sqrt((1.0d0 + t)) - sqrt(t))) + ((1.0d0 + sqrt((y + 1.0d0))) - (sqrt(y) + sqrt(x)))
else
tmp = (t_1 - sqrt(z)) + (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 + z));
double tmp;
if (y <= 6.2e+16) {
tmp = ((1.0 / (Math.sqrt(z) + t_1)) + (Math.sqrt((1.0 + t)) - Math.sqrt(t))) + ((1.0 + Math.sqrt((y + 1.0))) - (Math.sqrt(y) + Math.sqrt(x)));
} else {
tmp = (t_1 - Math.sqrt(z)) + (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 + z)) tmp = 0 if y <= 6.2e+16: tmp = ((1.0 / (math.sqrt(z) + t_1)) + (math.sqrt((1.0 + t)) - math.sqrt(t))) + ((1.0 + math.sqrt((y + 1.0))) - (math.sqrt(y) + math.sqrt(x))) else: tmp = (t_1 - math.sqrt(z)) + (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 + z)) tmp = 0.0 if (y <= 6.2e+16) tmp = Float64(Float64(Float64(1.0 / Float64(sqrt(z) + t_1)) + Float64(sqrt(Float64(1.0 + t)) - sqrt(t))) + Float64(Float64(1.0 + sqrt(Float64(y + 1.0))) - Float64(sqrt(y) + sqrt(x)))); else tmp = Float64(Float64(t_1 - sqrt(z)) + 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 + z));
tmp = 0.0;
if (y <= 6.2e+16)
tmp = ((1.0 / (sqrt(z) + t_1)) + (sqrt((1.0 + t)) - sqrt(t))) + ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x)));
else
tmp = (t_1 - sqrt(z)) + (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 + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 6.2e+16], N[(N[(N[(1.0 / N[(N[Sqrt[z], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z}\\
\mathbf{if}\;y \leq 6.2 \cdot 10^{+16}:\\
\;\;\;\;\left(\frac{1}{\sqrt{z} + t\_1} + \left(\sqrt{1 + t} - \sqrt{t}\right)\right) + \left(\left(1 + \sqrt{y + 1}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 - \sqrt{z}\right) + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\\
\end{array}
\end{array}
if y < 6.2e16Initial program 95.4%
associate-+l+95.4%
associate-+l-65.9%
associate-+l-95.4%
+-commutative95.4%
+-commutative95.4%
+-commutative95.4%
Simplified95.4%
Taylor expanded in x around 0 53.8%
+-commutative53.8%
Simplified53.8%
flip--97.6%
add-sqr-sqrt74.3%
add-sqr-sqrt97.6%
Applied egg-rr53.8%
associate--l+98.5%
+-inverses98.5%
metadata-eval98.5%
+-commutative98.5%
Simplified54.4%
if 6.2e16 < y Initial program 85.3%
associate-+l+85.3%
associate-+l-85.3%
associate-+l-85.3%
+-commutative85.3%
+-commutative85.3%
+-commutative85.3%
Simplified85.3%
+-commutative85.3%
flip--85.3%
flip--85.3%
frac-add85.3%
Applied egg-rr85.5%
Simplified91.3%
Taylor expanded in y around inf 88.4%
Taylor expanded in t around inf 46.5%
Final simplification50.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (sqrt (+ 1.0 z)) (sqrt z))))
(if (<= y 7.5e+16)
(+
(+ t_1 (/ 1.0 (+ (sqrt (+ 1.0 t)) (sqrt t))))
(- (+ 1.0 (sqrt (+ y 1.0))) (+ (sqrt y) (sqrt x))))
(+ t_1 (/ 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 + z)) - sqrt(z);
double tmp;
if (y <= 7.5e+16) {
tmp = (t_1 + (1.0 / (sqrt((1.0 + t)) + sqrt(t)))) + ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x)));
} else {
tmp = t_1 + (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 + z)) - sqrt(z)
if (y <= 7.5d+16) then
tmp = (t_1 + (1.0d0 / (sqrt((1.0d0 + t)) + sqrt(t)))) + ((1.0d0 + sqrt((y + 1.0d0))) - (sqrt(y) + sqrt(x)))
else
tmp = t_1 + (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 + z)) - Math.sqrt(z);
double tmp;
if (y <= 7.5e+16) {
tmp = (t_1 + (1.0 / (Math.sqrt((1.0 + t)) + Math.sqrt(t)))) + ((1.0 + Math.sqrt((y + 1.0))) - (Math.sqrt(y) + Math.sqrt(x)));
} else {
tmp = t_1 + (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 + z)) - math.sqrt(z) tmp = 0 if y <= 7.5e+16: tmp = (t_1 + (1.0 / (math.sqrt((1.0 + t)) + math.sqrt(t)))) + ((1.0 + math.sqrt((y + 1.0))) - (math.sqrt(y) + math.sqrt(x))) else: tmp = t_1 + (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 + z)) - sqrt(z)) tmp = 0.0 if (y <= 7.5e+16) tmp = Float64(Float64(t_1 + Float64(1.0 / Float64(sqrt(Float64(1.0 + t)) + sqrt(t)))) + Float64(Float64(1.0 + sqrt(Float64(y + 1.0))) - Float64(sqrt(y) + sqrt(x)))); else tmp = Float64(t_1 + 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 + z)) - sqrt(z);
tmp = 0.0;
if (y <= 7.5e+16)
tmp = (t_1 + (1.0 / (sqrt((1.0 + t)) + sqrt(t)))) + ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x)));
else
tmp = t_1 + (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 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 7.5e+16], N[(N[(t$95$1 + N[(1.0 / N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z} - \sqrt{z}\\
\mathbf{if}\;y \leq 7.5 \cdot 10^{+16}:\\
\;\;\;\;\left(t\_1 + \frac{1}{\sqrt{1 + t} + \sqrt{t}}\right) + \left(\left(1 + \sqrt{y + 1}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\\
\end{array}
\end{array}
if y < 7.5e16Initial program 95.4%
associate-+l+95.4%
associate-+l-65.9%
associate-+l-95.4%
+-commutative95.4%
+-commutative95.4%
+-commutative95.4%
Simplified95.4%
Taylor expanded in x around 0 53.8%
+-commutative53.8%
Simplified53.8%
flip--95.9%
add-sqr-sqrt70.7%
add-sqr-sqrt96.0%
Applied egg-rr54.0%
associate--l+96.4%
+-inverses96.4%
metadata-eval96.4%
+-commutative96.4%
Simplified54.3%
if 7.5e16 < y Initial program 85.3%
associate-+l+85.3%
associate-+l-85.3%
associate-+l-85.3%
+-commutative85.3%
+-commutative85.3%
+-commutative85.3%
Simplified85.3%
+-commutative85.3%
flip--85.3%
flip--85.3%
frac-add85.3%
Applied egg-rr85.5%
Simplified91.3%
Taylor expanded in y around inf 88.4%
Taylor expanded in t around inf 46.5%
Final simplification50.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (sqrt (+ 1.0 z)) (sqrt z))))
(if (<= y 5.5e+15)
(+
(+ (- (sqrt (+ 1.0 t)) (sqrt t)) t_1)
(- (+ 1.0 (sqrt (+ y 1.0))) (+ (sqrt y) (sqrt x))))
(+ t_1 (/ 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 + z)) - sqrt(z);
double tmp;
if (y <= 5.5e+15) {
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + t_1) + ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x)));
} else {
tmp = t_1 + (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 + z)) - sqrt(z)
if (y <= 5.5d+15) then
tmp = ((sqrt((1.0d0 + t)) - sqrt(t)) + t_1) + ((1.0d0 + sqrt((y + 1.0d0))) - (sqrt(y) + sqrt(x)))
else
tmp = t_1 + (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 + z)) - Math.sqrt(z);
double tmp;
if (y <= 5.5e+15) {
tmp = ((Math.sqrt((1.0 + t)) - Math.sqrt(t)) + t_1) + ((1.0 + Math.sqrt((y + 1.0))) - (Math.sqrt(y) + Math.sqrt(x)));
} else {
tmp = t_1 + (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 + z)) - math.sqrt(z) tmp = 0 if y <= 5.5e+15: tmp = ((math.sqrt((1.0 + t)) - math.sqrt(t)) + t_1) + ((1.0 + math.sqrt((y + 1.0))) - (math.sqrt(y) + math.sqrt(x))) else: tmp = t_1 + (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 + z)) - sqrt(z)) tmp = 0.0 if (y <= 5.5e+15) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + t_1) + Float64(Float64(1.0 + sqrt(Float64(y + 1.0))) - Float64(sqrt(y) + sqrt(x)))); else tmp = Float64(t_1 + 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 + z)) - sqrt(z);
tmp = 0.0;
if (y <= 5.5e+15)
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + t_1) + ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x)));
else
tmp = t_1 + (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 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5.5e+15], N[(N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(N[(1.0 + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z} - \sqrt{z}\\
\mathbf{if}\;y \leq 5.5 \cdot 10^{+15}:\\
\;\;\;\;\left(\left(\sqrt{1 + t} - \sqrt{t}\right) + t\_1\right) + \left(\left(1 + \sqrt{y + 1}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\\
\end{array}
\end{array}
if y < 5.5e15Initial program 95.7%
associate-+l+95.7%
associate-+l-65.9%
associate-+l-95.7%
+-commutative95.7%
+-commutative95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in x around 0 53.8%
+-commutative53.8%
Simplified53.8%
if 5.5e15 < y Initial program 85.1%
associate-+l+85.1%
associate-+l-85.1%
associate-+l-85.1%
+-commutative85.1%
+-commutative85.1%
+-commutative85.1%
Simplified85.1%
+-commutative85.1%
flip--85.1%
flip--85.1%
frac-add85.1%
Applied egg-rr85.6%
Simplified91.3%
Taylor expanded in y around inf 88.2%
Taylor expanded in t around inf 46.7%
Final simplification50.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)))
(t_2 (- (sqrt (+ 1.0 t)) (sqrt t))))
(if (<= y 3.2e-20)
(+ (+ t_2 t_1) (- 2.0 (+ (sqrt y) (sqrt x))))
(if (<= y 1.75e+20)
(+
(+ t_2 (* 0.5 (sqrt (/ 1.0 z))))
(+
(+ 1.0 (- (* x (+ 0.5 (* x -0.125))) (sqrt x)))
(/ 1.0 (+ (sqrt y) (sqrt (+ y 1.0))))))
(+ t_1 (/ 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 + z)) - sqrt(z);
double t_2 = sqrt((1.0 + t)) - sqrt(t);
double tmp;
if (y <= 3.2e-20) {
tmp = (t_2 + t_1) + (2.0 - (sqrt(y) + sqrt(x)));
} else if (y <= 1.75e+20) {
tmp = (t_2 + (0.5 * sqrt((1.0 / z)))) + ((1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))) + (1.0 / (sqrt(y) + sqrt((y + 1.0)))));
} else {
tmp = t_1 + (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) :: t_2
real(8) :: tmp
t_1 = sqrt((1.0d0 + z)) - sqrt(z)
t_2 = sqrt((1.0d0 + t)) - sqrt(t)
if (y <= 3.2d-20) then
tmp = (t_2 + t_1) + (2.0d0 - (sqrt(y) + sqrt(x)))
else if (y <= 1.75d+20) then
tmp = (t_2 + (0.5d0 * sqrt((1.0d0 / z)))) + ((1.0d0 + ((x * (0.5d0 + (x * (-0.125d0)))) - sqrt(x))) + (1.0d0 / (sqrt(y) + sqrt((y + 1.0d0)))))
else
tmp = t_1 + (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 + z)) - Math.sqrt(z);
double t_2 = Math.sqrt((1.0 + t)) - Math.sqrt(t);
double tmp;
if (y <= 3.2e-20) {
tmp = (t_2 + t_1) + (2.0 - (Math.sqrt(y) + Math.sqrt(x)));
} else if (y <= 1.75e+20) {
tmp = (t_2 + (0.5 * Math.sqrt((1.0 / z)))) + ((1.0 + ((x * (0.5 + (x * -0.125))) - Math.sqrt(x))) + (1.0 / (Math.sqrt(y) + Math.sqrt((y + 1.0)))));
} else {
tmp = t_1 + (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 + z)) - math.sqrt(z) t_2 = math.sqrt((1.0 + t)) - math.sqrt(t) tmp = 0 if y <= 3.2e-20: tmp = (t_2 + t_1) + (2.0 - (math.sqrt(y) + math.sqrt(x))) elif y <= 1.75e+20: tmp = (t_2 + (0.5 * math.sqrt((1.0 / z)))) + ((1.0 + ((x * (0.5 + (x * -0.125))) - math.sqrt(x))) + (1.0 / (math.sqrt(y) + math.sqrt((y + 1.0))))) else: tmp = t_1 + (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 + z)) - sqrt(z)) t_2 = Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) tmp = 0.0 if (y <= 3.2e-20) tmp = Float64(Float64(t_2 + t_1) + Float64(2.0 - Float64(sqrt(y) + sqrt(x)))); elseif (y <= 1.75e+20) tmp = Float64(Float64(t_2 + Float64(0.5 * sqrt(Float64(1.0 / z)))) + Float64(Float64(1.0 + Float64(Float64(x * Float64(0.5 + Float64(x * -0.125))) - sqrt(x))) + Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(y + 1.0)))))); else tmp = Float64(t_1 + 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 + z)) - sqrt(z);
t_2 = sqrt((1.0 + t)) - sqrt(t);
tmp = 0.0;
if (y <= 3.2e-20)
tmp = (t_2 + t_1) + (2.0 - (sqrt(y) + sqrt(x)));
elseif (y <= 1.75e+20)
tmp = (t_2 + (0.5 * sqrt((1.0 / z)))) + ((1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))) + (1.0 / (sqrt(y) + sqrt((y + 1.0)))));
else
tmp = t_1 + (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 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 3.2e-20], N[(N[(t$95$2 + t$95$1), $MachinePrecision] + N[(2.0 - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+20], N[(N[(t$95$2 + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 + N[(N[(x * N[(0.5 + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z} - \sqrt{z}\\
t_2 := \sqrt{1 + t} - \sqrt{t}\\
\mathbf{if}\;y \leq 3.2 \cdot 10^{-20}:\\
\;\;\;\;\left(t\_2 + t\_1\right) + \left(2 - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+20}:\\
\;\;\;\;\left(t\_2 + 0.5 \cdot \sqrt{\frac{1}{z}}\right) + \left(\left(1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\right) + \frac{1}{\sqrt{y} + \sqrt{y + 1}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\\
\end{array}
\end{array}
if y < 3.1999999999999997e-20Initial program 97.2%
associate-+l+97.2%
associate-+l-66.5%
associate-+l-97.2%
+-commutative97.2%
+-commutative97.2%
+-commutative97.2%
Simplified97.2%
Taylor expanded in x around 0 54.7%
+-commutative54.7%
Simplified54.7%
Taylor expanded in y around 0 54.7%
if 3.1999999999999997e-20 < y < 1.75e20Initial program 83.1%
associate-+l+83.0%
associate-+l-60.9%
associate-+l-83.0%
+-commutative83.0%
+-commutative83.0%
+-commutative83.0%
Simplified83.0%
Taylor expanded in x around 0 45.6%
associate--l+45.6%
Simplified45.6%
flip--48.2%
add-sqr-sqrt48.3%
add-sqr-sqrt50.1%
Applied egg-rr50.1%
associate--l+50.1%
+-inverses50.1%
metadata-eval50.1%
+-commutative50.1%
Simplified50.1%
Taylor expanded in z around inf 27.1%
if 1.75e20 < y Initial program 86.1%
associate-+l+86.1%
associate-+l-86.1%
associate-+l-86.1%
+-commutative86.1%
+-commutative86.1%
+-commutative86.1%
Simplified86.1%
+-commutative86.1%
flip--86.1%
flip--86.1%
frac-add86.1%
Applied egg-rr86.3%
Simplified91.1%
Taylor expanded in y around inf 89.2%
Taylor expanded in t around inf 47.2%
Final simplification48.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (sqrt (+ 1.0 z)) (sqrt z))))
(if (<= y 4e-21)
(+ (+ (- (sqrt (+ 1.0 t)) (sqrt t)) t_1) (- 2.0 (+ (sqrt y) (sqrt x))))
(if (<= y 1.36e+25)
(+
t_1
(+
(+ 1.0 (- (* x (+ 0.5 (* x -0.125))) (sqrt x)))
(/ 1.0 (+ (sqrt y) (sqrt (+ y 1.0))))))
(+ t_1 (/ 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 + z)) - sqrt(z);
double tmp;
if (y <= 4e-21) {
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + t_1) + (2.0 - (sqrt(y) + sqrt(x)));
} else if (y <= 1.36e+25) {
tmp = t_1 + ((1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))) + (1.0 / (sqrt(y) + sqrt((y + 1.0)))));
} else {
tmp = t_1 + (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 + z)) - sqrt(z)
if (y <= 4d-21) then
tmp = ((sqrt((1.0d0 + t)) - sqrt(t)) + t_1) + (2.0d0 - (sqrt(y) + sqrt(x)))
else if (y <= 1.36d+25) then
tmp = t_1 + ((1.0d0 + ((x * (0.5d0 + (x * (-0.125d0)))) - sqrt(x))) + (1.0d0 / (sqrt(y) + sqrt((y + 1.0d0)))))
else
tmp = t_1 + (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 + z)) - Math.sqrt(z);
double tmp;
if (y <= 4e-21) {
tmp = ((Math.sqrt((1.0 + t)) - Math.sqrt(t)) + t_1) + (2.0 - (Math.sqrt(y) + Math.sqrt(x)));
} else if (y <= 1.36e+25) {
tmp = t_1 + ((1.0 + ((x * (0.5 + (x * -0.125))) - Math.sqrt(x))) + (1.0 / (Math.sqrt(y) + Math.sqrt((y + 1.0)))));
} else {
tmp = t_1 + (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 + z)) - math.sqrt(z) tmp = 0 if y <= 4e-21: tmp = ((math.sqrt((1.0 + t)) - math.sqrt(t)) + t_1) + (2.0 - (math.sqrt(y) + math.sqrt(x))) elif y <= 1.36e+25: tmp = t_1 + ((1.0 + ((x * (0.5 + (x * -0.125))) - math.sqrt(x))) + (1.0 / (math.sqrt(y) + math.sqrt((y + 1.0))))) else: tmp = t_1 + (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 + z)) - sqrt(z)) tmp = 0.0 if (y <= 4e-21) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + t_1) + Float64(2.0 - Float64(sqrt(y) + sqrt(x)))); elseif (y <= 1.36e+25) tmp = Float64(t_1 + Float64(Float64(1.0 + Float64(Float64(x * Float64(0.5 + Float64(x * -0.125))) - sqrt(x))) + Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(y + 1.0)))))); else tmp = Float64(t_1 + 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 + z)) - sqrt(z);
tmp = 0.0;
if (y <= 4e-21)
tmp = ((sqrt((1.0 + t)) - sqrt(t)) + t_1) + (2.0 - (sqrt(y) + sqrt(x)));
elseif (y <= 1.36e+25)
tmp = t_1 + ((1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))) + (1.0 / (sqrt(y) + sqrt((y + 1.0)))));
else
tmp = t_1 + (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 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 4e-21], 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[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.36e+25], N[(t$95$1 + N[(N[(1.0 + N[(N[(x * N[(0.5 + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z} - \sqrt{z}\\
\mathbf{if}\;y \leq 4 \cdot 10^{-21}:\\
\;\;\;\;\left(\left(\sqrt{1 + t} - \sqrt{t}\right) + t\_1\right) + \left(2 - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{elif}\;y \leq 1.36 \cdot 10^{+25}:\\
\;\;\;\;t\_1 + \left(\left(1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\right) + \frac{1}{\sqrt{y} + \sqrt{y + 1}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\\
\end{array}
\end{array}
if y < 3.99999999999999963e-21Initial program 97.2%
associate-+l+97.2%
associate-+l-66.5%
associate-+l-97.2%
+-commutative97.2%
+-commutative97.2%
+-commutative97.2%
Simplified97.2%
Taylor expanded in x around 0 54.7%
+-commutative54.7%
Simplified54.7%
Taylor expanded in y around 0 54.7%
if 3.99999999999999963e-21 < y < 1.36e25Initial program 83.1%
associate-+l+83.0%
associate-+l-61.8%
associate-+l-83.0%
+-commutative83.0%
+-commutative83.0%
+-commutative83.0%
Simplified83.0%
Taylor expanded in x around 0 47.1%
associate--l+47.1%
Simplified47.1%
flip--49.6%
add-sqr-sqrt49.7%
add-sqr-sqrt51.5%
Applied egg-rr51.5%
associate--l+52.0%
+-inverses52.0%
metadata-eval52.0%
+-commutative52.0%
Simplified52.0%
Taylor expanded in t around inf 30.2%
if 1.36e25 < y Initial program 86.1%
associate-+l+86.1%
associate-+l-86.1%
associate-+l-86.1%
+-commutative86.1%
+-commutative86.1%
+-commutative86.1%
Simplified86.1%
+-commutative86.1%
flip--86.1%
flip--86.1%
frac-add86.1%
Applied egg-rr86.3%
Simplified91.1%
Taylor expanded in y around inf 89.2%
Taylor expanded in t around inf 47.4%
Final simplification48.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 z)) (sqrt z))))
(if (<= x 4.3e-5)
(+
t_1
(+
(+ 1.0 (- (* x (+ 0.5 (* x -0.125))) (sqrt x)))
(/ 1.0 (+ (sqrt y) (sqrt (+ y 1.0))))))
(+ t_1 (/ 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 + z)) - sqrt(z);
double tmp;
if (x <= 4.3e-5) {
tmp = t_1 + ((1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))) + (1.0 / (sqrt(y) + sqrt((y + 1.0)))));
} else {
tmp = t_1 + (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 + z)) - sqrt(z)
if (x <= 4.3d-5) then
tmp = t_1 + ((1.0d0 + ((x * (0.5d0 + (x * (-0.125d0)))) - sqrt(x))) + (1.0d0 / (sqrt(y) + sqrt((y + 1.0d0)))))
else
tmp = t_1 + (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 + z)) - Math.sqrt(z);
double tmp;
if (x <= 4.3e-5) {
tmp = t_1 + ((1.0 + ((x * (0.5 + (x * -0.125))) - Math.sqrt(x))) + (1.0 / (Math.sqrt(y) + Math.sqrt((y + 1.0)))));
} else {
tmp = t_1 + (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 + z)) - math.sqrt(z) tmp = 0 if x <= 4.3e-5: tmp = t_1 + ((1.0 + ((x * (0.5 + (x * -0.125))) - math.sqrt(x))) + (1.0 / (math.sqrt(y) + math.sqrt((y + 1.0))))) else: tmp = t_1 + (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 + z)) - sqrt(z)) tmp = 0.0 if (x <= 4.3e-5) tmp = Float64(t_1 + Float64(Float64(1.0 + Float64(Float64(x * Float64(0.5 + Float64(x * -0.125))) - sqrt(x))) + Float64(1.0 / Float64(sqrt(y) + sqrt(Float64(y + 1.0)))))); else tmp = Float64(t_1 + 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 + z)) - sqrt(z);
tmp = 0.0;
if (x <= 4.3e-5)
tmp = t_1 + ((1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))) + (1.0 / (sqrt(y) + sqrt((y + 1.0)))));
else
tmp = t_1 + (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 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 4.3e-5], N[(t$95$1 + N[(N[(1.0 + N[(N[(x * N[(0.5 + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z} - \sqrt{z}\\
\mathbf{if}\;x \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;t\_1 + \left(\left(1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\right) + \frac{1}{\sqrt{y} + \sqrt{y + 1}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\\
\end{array}
\end{array}
if x < 4.3000000000000002e-5Initial program 96.9%
associate-+l+96.9%
associate-+l-96.9%
associate-+l-96.9%
+-commutative96.9%
+-commutative96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in x around 0 96.9%
associate--l+96.9%
Simplified96.9%
flip--97.4%
add-sqr-sqrt76.0%
add-sqr-sqrt97.7%
Applied egg-rr97.7%
associate--l+97.8%
+-inverses97.8%
metadata-eval97.8%
+-commutative97.8%
Simplified97.8%
Taylor expanded in t around inf 55.7%
if 4.3000000000000002e-5 < x Initial program 83.1%
associate-+l+83.1%
associate-+l-52.3%
associate-+l-83.1%
+-commutative83.1%
+-commutative83.1%
+-commutative83.1%
Simplified83.1%
+-commutative83.1%
flip--83.2%
flip--83.2%
frac-add83.2%
Applied egg-rr84.5%
Simplified90.6%
Taylor expanded in y around inf 51.4%
Taylor expanded in t around inf 24.9%
Final simplification41.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 z)) (sqrt z))))
(if (<= x 4.3e-5)
(+
t_1
(+
(- (sqrt (+ y 1.0)) (sqrt y))
(+ 1.0 (- (* x (+ 0.5 (* x -0.125))) (sqrt x)))))
(+ t_1 (/ 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 + z)) - sqrt(z);
double tmp;
if (x <= 4.3e-5) {
tmp = t_1 + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))));
} else {
tmp = t_1 + (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 + z)) - sqrt(z)
if (x <= 4.3d-5) then
tmp = t_1 + ((sqrt((y + 1.0d0)) - sqrt(y)) + (1.0d0 + ((x * (0.5d0 + (x * (-0.125d0)))) - sqrt(x))))
else
tmp = t_1 + (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 + z)) - Math.sqrt(z);
double tmp;
if (x <= 4.3e-5) {
tmp = t_1 + ((Math.sqrt((y + 1.0)) - Math.sqrt(y)) + (1.0 + ((x * (0.5 + (x * -0.125))) - Math.sqrt(x))));
} else {
tmp = t_1 + (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 + z)) - math.sqrt(z) tmp = 0 if x <= 4.3e-5: tmp = t_1 + ((math.sqrt((y + 1.0)) - math.sqrt(y)) + (1.0 + ((x * (0.5 + (x * -0.125))) - math.sqrt(x)))) else: tmp = t_1 + (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 + z)) - sqrt(z)) tmp = 0.0 if (x <= 4.3e-5) tmp = Float64(t_1 + Float64(Float64(sqrt(Float64(y + 1.0)) - sqrt(y)) + Float64(1.0 + Float64(Float64(x * Float64(0.5 + Float64(x * -0.125))) - sqrt(x))))); else tmp = Float64(t_1 + 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 + z)) - sqrt(z);
tmp = 0.0;
if (x <= 4.3e-5)
tmp = t_1 + ((sqrt((y + 1.0)) - sqrt(y)) + (1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x))));
else
tmp = t_1 + (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 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 4.3e-5], N[(t$95$1 + N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(N[(x * N[(0.5 + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z} - \sqrt{z}\\
\mathbf{if}\;x \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;t\_1 + \left(\left(\sqrt{y + 1} - \sqrt{y}\right) + \left(1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\\
\end{array}
\end{array}
if x < 4.3000000000000002e-5Initial program 96.9%
associate-+l+96.9%
associate-+l-96.9%
associate-+l-96.9%
+-commutative96.9%
+-commutative96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in x around 0 96.9%
associate--l+96.9%
Simplified96.9%
Taylor expanded in t around inf 55.2%
if 4.3000000000000002e-5 < x Initial program 83.1%
associate-+l+83.1%
associate-+l-52.3%
associate-+l-83.1%
+-commutative83.1%
+-commutative83.1%
+-commutative83.1%
Simplified83.1%
+-commutative83.1%
flip--83.2%
flip--83.2%
frac-add83.2%
Applied egg-rr84.5%
Simplified90.6%
Taylor expanded in y around inf 51.4%
Taylor expanded in t around inf 24.9%
Final simplification40.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (sqrt (+ 1.0 z)) (sqrt z))))
(if (<= y 4.5e+15)
(+ t_1 (- (+ 1.0 (sqrt (+ y 1.0))) (+ (sqrt y) (sqrt x))))
(+ t_1 (/ 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 + z)) - sqrt(z);
double tmp;
if (y <= 4.5e+15) {
tmp = t_1 + ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x)));
} else {
tmp = t_1 + (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 + z)) - sqrt(z)
if (y <= 4.5d+15) then
tmp = t_1 + ((1.0d0 + sqrt((y + 1.0d0))) - (sqrt(y) + sqrt(x)))
else
tmp = t_1 + (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 + z)) - Math.sqrt(z);
double tmp;
if (y <= 4.5e+15) {
tmp = t_1 + ((1.0 + Math.sqrt((y + 1.0))) - (Math.sqrt(y) + Math.sqrt(x)));
} else {
tmp = t_1 + (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 + z)) - math.sqrt(z) tmp = 0 if y <= 4.5e+15: tmp = t_1 + ((1.0 + math.sqrt((y + 1.0))) - (math.sqrt(y) + math.sqrt(x))) else: tmp = t_1 + (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 + z)) - sqrt(z)) tmp = 0.0 if (y <= 4.5e+15) tmp = Float64(t_1 + Float64(Float64(1.0 + sqrt(Float64(y + 1.0))) - Float64(sqrt(y) + sqrt(x)))); else tmp = Float64(t_1 + 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 + z)) - sqrt(z);
tmp = 0.0;
if (y <= 4.5e+15)
tmp = t_1 + ((1.0 + sqrt((y + 1.0))) - (sqrt(y) + sqrt(x)));
else
tmp = t_1 + (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 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 4.5e+15], N[(t$95$1 + N[(N[(1.0 + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + z} - \sqrt{z}\\
\mathbf{if}\;y \leq 4.5 \cdot 10^{+15}:\\
\;\;\;\;t\_1 + \left(\left(1 + \sqrt{y + 1}\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\sqrt{x} + \sqrt{1 + x}}\\
\end{array}
\end{array}
if y < 4.5e15Initial program 95.7%
associate-+l+95.7%
associate-+l-65.9%
associate-+l-95.7%
+-commutative95.7%
+-commutative95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in x around 0 53.8%
+-commutative53.8%
Simplified53.8%
Taylor expanded in t around inf 29.5%
if 4.5e15 < y Initial program 85.1%
associate-+l+85.1%
associate-+l-85.1%
associate-+l-85.1%
+-commutative85.1%
+-commutative85.1%
+-commutative85.1%
Simplified85.1%
+-commutative85.1%
flip--85.1%
flip--85.1%
frac-add85.1%
Applied egg-rr85.6%
Simplified91.3%
Taylor expanded in y around inf 88.2%
Taylor expanded in t around inf 46.7%
Final simplification38.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 (+ y 1.0))))
(if (<= z 21500000.0)
(+ 1.0 (+ (sqrt (+ 1.0 z)) (- t_1 (+ (sqrt x) (+ (sqrt y) (sqrt z))))))
(+ (sqrt (+ 1.0 x)) (+ t_1 (- (* 0.5 (sqrt (/ 1.0 z))) (sqrt y)))))))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 <= 21500000.0) {
tmp = 1.0 + (sqrt((1.0 + z)) + (t_1 - (sqrt(x) + (sqrt(y) + sqrt(z)))));
} else {
tmp = sqrt((1.0 + x)) + (t_1 + ((0.5 * sqrt((1.0 / z))) - sqrt(y)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((y + 1.0d0))
if (z <= 21500000.0d0) then
tmp = 1.0d0 + (sqrt((1.0d0 + z)) + (t_1 - (sqrt(x) + (sqrt(y) + sqrt(z)))))
else
tmp = sqrt((1.0d0 + x)) + (t_1 + ((0.5d0 * sqrt((1.0d0 / z))) - sqrt(y)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((y + 1.0));
double tmp;
if (z <= 21500000.0) {
tmp = 1.0 + (Math.sqrt((1.0 + z)) + (t_1 - (Math.sqrt(x) + (Math.sqrt(y) + Math.sqrt(z)))));
} else {
tmp = Math.sqrt((1.0 + x)) + (t_1 + ((0.5 * Math.sqrt((1.0 / z))) - Math.sqrt(y)));
}
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 <= 21500000.0: tmp = 1.0 + (math.sqrt((1.0 + z)) + (t_1 - (math.sqrt(x) + (math.sqrt(y) + math.sqrt(z))))) else: tmp = math.sqrt((1.0 + x)) + (t_1 + ((0.5 * math.sqrt((1.0 / z))) - math.sqrt(y))) 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 <= 21500000.0) tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 + z)) + Float64(t_1 - Float64(sqrt(x) + Float64(sqrt(y) + sqrt(z)))))); else tmp = Float64(sqrt(Float64(1.0 + x)) + Float64(t_1 + Float64(Float64(0.5 * sqrt(Float64(1.0 / z))) - sqrt(y)))); 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 <= 21500000.0)
tmp = 1.0 + (sqrt((1.0 + z)) + (t_1 - (sqrt(x) + (sqrt(y) + sqrt(z)))));
else
tmp = sqrt((1.0 + x)) + (t_1 + ((0.5 * sqrt((1.0 / z))) - sqrt(y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, 21500000.0], N[(1.0 + N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 - 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[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[Sqrt[y], $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 21500000:\\
\;\;\;\;1 + \left(\sqrt{1 + z} + \left(t\_1 - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{1 + x} + \left(t\_1 + \left(0.5 \cdot \sqrt{\frac{1}{z}} - \sqrt{y}\right)\right)\\
\end{array}
\end{array}
if z < 2.15e7Initial program 96.7%
associate-+l+96.7%
associate-+l-82.8%
associate-+l-96.7%
+-commutative96.7%
+-commutative96.7%
+-commutative96.7%
Simplified96.7%
Taylor expanded in t around inf 20.4%
associate--l+24.8%
+-commutative24.8%
+-commutative24.8%
Simplified24.8%
Taylor expanded in x around 0 17.9%
associate--l+25.8%
+-commutative25.8%
+-commutative25.8%
associate-+r-35.3%
Simplified35.3%
if 2.15e7 < z Initial program 83.4%
associate-+l+83.4%
associate-+l-67.8%
associate-+l-83.4%
+-commutative83.4%
+-commutative83.4%
+-commutative83.4%
Simplified83.4%
Taylor expanded in t around inf 4.9%
associate--l+21.0%
+-commutative21.0%
+-commutative21.0%
Simplified21.0%
Taylor expanded in z around inf 28.1%
associate--l+28.1%
Simplified28.1%
Taylor expanded in y around inf 28.1%
Final simplification31.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ 1.0 x))))
(if (<= y 5.4e+14)
(- (+ (sqrt (+ y 1.0)) t_1) (+ (sqrt y) (sqrt x)))
(+ (- (sqrt (+ 1.0 z)) (sqrt z)) (/ 1.0 (+ (sqrt x) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + x));
double tmp;
if (y <= 5.4e+14) {
tmp = (sqrt((y + 1.0)) + t_1) - (sqrt(y) + sqrt(x));
} else {
tmp = (sqrt((1.0 + z)) - sqrt(z)) + (1.0 / (sqrt(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 + x))
if (y <= 5.4d+14) then
tmp = (sqrt((y + 1.0d0)) + t_1) - (sqrt(y) + sqrt(x))
else
tmp = (sqrt((1.0d0 + z)) - sqrt(z)) + (1.0d0 / (sqrt(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 + x));
double tmp;
if (y <= 5.4e+14) {
tmp = (Math.sqrt((y + 1.0)) + t_1) - (Math.sqrt(y) + Math.sqrt(x));
} else {
tmp = (Math.sqrt((1.0 + z)) - Math.sqrt(z)) + (1.0 / (Math.sqrt(x) + t_1));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + x)) tmp = 0 if y <= 5.4e+14: tmp = (math.sqrt((y + 1.0)) + t_1) - (math.sqrt(y) + math.sqrt(x)) else: tmp = (math.sqrt((1.0 + z)) - math.sqrt(z)) + (1.0 / (math.sqrt(x) + t_1)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 + x)) tmp = 0.0 if (y <= 5.4e+14) tmp = Float64(Float64(sqrt(Float64(y + 1.0)) + t_1) - Float64(sqrt(y) + sqrt(x))); else tmp = Float64(Float64(sqrt(Float64(1.0 + z)) - sqrt(z)) + Float64(1.0 / Float64(sqrt(x) + t_1))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + x));
tmp = 0.0;
if (y <= 5.4e+14)
tmp = (sqrt((y + 1.0)) + t_1) - (sqrt(y) + sqrt(x));
else
tmp = (sqrt((1.0 + z)) - sqrt(z)) + (1.0 / (sqrt(x) + t_1));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 5.4e+14], N[(N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + x}\\
\mathbf{if}\;y \leq 5.4 \cdot 10^{+14}:\\
\;\;\;\;\left(\sqrt{y + 1} + t\_1\right) - \left(\sqrt{y} + \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{1 + z} - \sqrt{z}\right) + \frac{1}{\sqrt{x} + t\_1}\\
\end{array}
\end{array}
if y < 5.4e14Initial program 95.9%
associate-+l+95.9%
associate-+l-65.9%
associate-+l-95.9%
+-commutative95.9%
+-commutative95.9%
+-commutative95.9%
Simplified95.9%
Taylor expanded in t around inf 22.0%
associate--l+26.5%
+-commutative26.5%
+-commutative26.5%
Simplified26.5%
Taylor expanded in z around inf 20.9%
if 5.4e14 < y Initial program 85.0%
associate-+l+85.0%
associate-+l-85.0%
associate-+l-85.0%
+-commutative85.0%
+-commutative85.0%
+-commutative85.0%
Simplified85.0%
+-commutative85.0%
flip--85.2%
flip--85.2%
frac-add85.2%
Applied egg-rr85.7%
Simplified91.4%
Taylor expanded in y around inf 88.0%
Taylor expanded in t around inf 46.5%
Final simplification34.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))))
(if (<= x 2.2e-22)
(+ t_1 (- (sqrt (+ y 1.0)) (+ (sqrt y) (sqrt x))))
(if (<= x 8500000.0)
(- (+ t_1 (* 0.5 (sqrt (/ 1.0 z)))) (sqrt x))
(/ (+ (* -0.125 (sqrt (/ 1.0 x))) (* (sqrt x) 0.5)) x)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + x));
double tmp;
if (x <= 2.2e-22) {
tmp = t_1 + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)));
} else if (x <= 8500000.0) {
tmp = (t_1 + (0.5 * sqrt((1.0 / z)))) - sqrt(x);
} else {
tmp = ((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / x;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((1.0d0 + x))
if (x <= 2.2d-22) then
tmp = t_1 + (sqrt((y + 1.0d0)) - (sqrt(y) + sqrt(x)))
else if (x <= 8500000.0d0) then
tmp = (t_1 + (0.5d0 * sqrt((1.0d0 / z)))) - sqrt(x)
else
tmp = (((-0.125d0) * sqrt((1.0d0 / x))) + (sqrt(x) * 0.5d0)) / x
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + x));
double tmp;
if (x <= 2.2e-22) {
tmp = t_1 + (Math.sqrt((y + 1.0)) - (Math.sqrt(y) + Math.sqrt(x)));
} else if (x <= 8500000.0) {
tmp = (t_1 + (0.5 * Math.sqrt((1.0 / z)))) - Math.sqrt(x);
} else {
tmp = ((-0.125 * Math.sqrt((1.0 / x))) + (Math.sqrt(x) * 0.5)) / x;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + x)) tmp = 0 if x <= 2.2e-22: tmp = t_1 + (math.sqrt((y + 1.0)) - (math.sqrt(y) + math.sqrt(x))) elif x <= 8500000.0: tmp = (t_1 + (0.5 * math.sqrt((1.0 / z)))) - math.sqrt(x) else: tmp = ((-0.125 * math.sqrt((1.0 / x))) + (math.sqrt(x) * 0.5)) / x return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 + x)) tmp = 0.0 if (x <= 2.2e-22) tmp = Float64(t_1 + Float64(sqrt(Float64(y + 1.0)) - Float64(sqrt(y) + sqrt(x)))); elseif (x <= 8500000.0) tmp = Float64(Float64(t_1 + Float64(0.5 * sqrt(Float64(1.0 / z)))) - sqrt(x)); else tmp = Float64(Float64(Float64(-0.125 * sqrt(Float64(1.0 / x))) + Float64(sqrt(x) * 0.5)) / x); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + x));
tmp = 0.0;
if (x <= 2.2e-22)
tmp = t_1 + (sqrt((y + 1.0)) - (sqrt(y) + sqrt(x)));
elseif (x <= 8500000.0)
tmp = (t_1 + (0.5 * sqrt((1.0 / z)))) - sqrt(x);
else
tmp = ((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / x;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, 2.2e-22], N[(t$95$1 + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8500000.0], N[(N[(t$95$1 + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.125 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[x], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + x}\\
\mathbf{if}\;x \leq 2.2 \cdot 10^{-22}:\\
\;\;\;\;t\_1 + \left(\sqrt{y + 1} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{elif}\;x \leq 8500000:\\
\;\;\;\;\left(t\_1 + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\
\end{array}
\end{array}
if x < 2.2000000000000001e-22Initial program 96.9%
associate-+l+96.9%
associate-+l-96.9%
associate-+l-96.9%
+-commutative96.9%
+-commutative96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in t around inf 19.4%
associate--l+37.1%
+-commutative37.1%
+-commutative37.1%
Simplified37.1%
Taylor expanded in z around inf 33.0%
if 2.2000000000000001e-22 < x < 8.5e6Initial program 96.6%
associate-+l+96.6%
associate-+l-96.5%
associate-+l-96.6%
+-commutative96.6%
+-commutative96.6%
+-commutative96.6%
Simplified96.6%
Taylor expanded in t around inf 27.6%
associate--l+39.1%
+-commutative39.1%
+-commutative39.1%
Simplified39.1%
Taylor expanded in z around inf 26.5%
associate--l+26.5%
Simplified26.5%
Taylor expanded in y around inf 26.6%
if 8.5e6 < x Initial program 82.5%
associate-+l+82.5%
associate-+l-50.5%
associate-+l-82.5%
+-commutative82.5%
+-commutative82.5%
+-commutative82.5%
Simplified82.5%
Taylor expanded in t around inf 4.2%
associate--l+5.9%
+-commutative5.9%
+-commutative5.9%
Simplified5.9%
Taylor expanded in x around inf 3.4%
mul-1-neg3.4%
Simplified3.4%
Taylor expanded in x around inf 8.9%
Final simplification21.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y 75000000.0) (- (+ (+ 1.0 (sqrt (+ y 1.0))) (* x 0.5)) (+ (sqrt y) (sqrt x))) (+ 1.0 (- (* 0.5 (+ (sqrt (/ 1.0 y)) (+ x (sqrt (/ 1.0 z))))) (sqrt x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 75000000.0) {
tmp = ((1.0 + sqrt((y + 1.0))) + (x * 0.5)) - (sqrt(y) + sqrt(x));
} else {
tmp = 1.0 + ((0.5 * (sqrt((1.0 / y)) + (x + sqrt((1.0 / z))))) - sqrt(x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 75000000.0d0) then
tmp = ((1.0d0 + sqrt((y + 1.0d0))) + (x * 0.5d0)) - (sqrt(y) + sqrt(x))
else
tmp = 1.0d0 + ((0.5d0 * (sqrt((1.0d0 / y)) + (x + sqrt((1.0d0 / z))))) - sqrt(x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 75000000.0) {
tmp = ((1.0 + Math.sqrt((y + 1.0))) + (x * 0.5)) - (Math.sqrt(y) + Math.sqrt(x));
} else {
tmp = 1.0 + ((0.5 * (Math.sqrt((1.0 / y)) + (x + Math.sqrt((1.0 / z))))) - Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 75000000.0: tmp = ((1.0 + math.sqrt((y + 1.0))) + (x * 0.5)) - (math.sqrt(y) + math.sqrt(x)) else: tmp = 1.0 + ((0.5 * (math.sqrt((1.0 / y)) + (x + math.sqrt((1.0 / z))))) - math.sqrt(x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= 75000000.0) tmp = Float64(Float64(Float64(1.0 + sqrt(Float64(y + 1.0))) + Float64(x * 0.5)) - Float64(sqrt(y) + sqrt(x))); else tmp = Float64(1.0 + Float64(Float64(0.5 * Float64(sqrt(Float64(1.0 / y)) + Float64(x + sqrt(Float64(1.0 / z))))) - sqrt(x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= 75000000.0)
tmp = ((1.0 + sqrt((y + 1.0))) + (x * 0.5)) - (sqrt(y) + sqrt(x));
else
tmp = 1.0 + ((0.5 * (sqrt((1.0 / y)) + (x + sqrt((1.0 / z))))) - sqrt(x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, 75000000.0], N[(N[(N[(1.0 + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(x * 0.5), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 * N[(N[Sqrt[N[(1.0 / y), $MachinePrecision]], $MachinePrecision] + N[(x + N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 75000000:\\
\;\;\;\;\left(\left(1 + \sqrt{y + 1}\right) + x \cdot 0.5\right) - \left(\sqrt{y} + \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(0.5 \cdot \left(\sqrt{\frac{1}{y}} + \left(x + \sqrt{\frac{1}{z}}\right)\right) - \sqrt{x}\right)\\
\end{array}
\end{array}
if y < 7.5e7Initial program 96.8%
associate-+l+96.8%
associate-+l-66.4%
associate-+l-96.8%
+-commutative96.8%
+-commutative96.8%
+-commutative96.8%
Simplified96.8%
Taylor expanded in t around inf 22.4%
associate--l+26.8%
+-commutative26.8%
+-commutative26.8%
Simplified26.8%
Taylor expanded in z around inf 17.5%
associate--l+17.5%
Simplified17.5%
Taylor expanded in x around 0 17.0%
associate-+r+17.0%
distribute-lft-out17.0%
Simplified17.0%
Taylor expanded in x around inf 20.2%
if 7.5e7 < y Initial program 84.5%
associate-+l+84.5%
associate-+l-84.1%
associate-+l-84.5%
+-commutative84.5%
+-commutative84.5%
+-commutative84.5%
Simplified84.5%
Taylor expanded in t around inf 4.4%
associate--l+19.6%
+-commutative19.6%
+-commutative19.6%
Simplified19.6%
Taylor expanded in z around inf 17.3%
associate--l+17.3%
Simplified17.3%
Taylor expanded in x around 0 5.1%
associate-+r+5.1%
distribute-lft-out5.1%
Simplified5.1%
Taylor expanded in y around inf 17.1%
associate--l+17.1%
distribute-lft-out17.1%
Simplified17.1%
Final simplification18.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y 2.55e+17) (- (+ (+ 1.0 (sqrt (+ y 1.0))) (* x 0.5)) (+ (sqrt y) (sqrt x))) (- (+ (sqrt (+ 1.0 x)) (* 0.5 (sqrt (/ 1.0 z)))) (sqrt x))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.55e+17) {
tmp = ((1.0 + sqrt((y + 1.0))) + (x * 0.5)) - (sqrt(y) + sqrt(x));
} else {
tmp = (sqrt((1.0 + x)) + (0.5 * sqrt((1.0 / z)))) - sqrt(x);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 2.55d+17) then
tmp = ((1.0d0 + sqrt((y + 1.0d0))) + (x * 0.5d0)) - (sqrt(y) + sqrt(x))
else
tmp = (sqrt((1.0d0 + x)) + (0.5d0 * sqrt((1.0d0 / z)))) - sqrt(x)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.55e+17) {
tmp = ((1.0 + Math.sqrt((y + 1.0))) + (x * 0.5)) - (Math.sqrt(y) + Math.sqrt(x));
} else {
tmp = (Math.sqrt((1.0 + x)) + (0.5 * Math.sqrt((1.0 / z)))) - Math.sqrt(x);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 2.55e+17: tmp = ((1.0 + math.sqrt((y + 1.0))) + (x * 0.5)) - (math.sqrt(y) + math.sqrt(x)) else: tmp = (math.sqrt((1.0 + x)) + (0.5 * math.sqrt((1.0 / z)))) - math.sqrt(x) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= 2.55e+17) tmp = Float64(Float64(Float64(1.0 + sqrt(Float64(y + 1.0))) + Float64(x * 0.5)) - Float64(sqrt(y) + sqrt(x))); else tmp = Float64(Float64(sqrt(Float64(1.0 + x)) + Float64(0.5 * sqrt(Float64(1.0 / z)))) - sqrt(x)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= 2.55e+17)
tmp = ((1.0 + sqrt((y + 1.0))) + (x * 0.5)) - (sqrt(y) + sqrt(x));
else
tmp = (sqrt((1.0 + x)) + (0.5 * sqrt((1.0 / z)))) - sqrt(x);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, 2.55e+17], N[(N[(N[(1.0 + N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(x * 0.5), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[(0.5 * N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.55 \cdot 10^{+17}:\\
\;\;\;\;\left(\left(1 + \sqrt{y + 1}\right) + x \cdot 0.5\right) - \left(\sqrt{y} + \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{1 + x} + 0.5 \cdot \sqrt{\frac{1}{z}}\right) - \sqrt{x}\\
\end{array}
\end{array}
if y < 2.55e17Initial program 95.4%
associate-+l+95.4%
associate-+l-65.9%
associate-+l-95.4%
+-commutative95.4%
+-commutative95.4%
+-commutative95.4%
Simplified95.4%
Taylor expanded in t around inf 22.4%
associate--l+26.8%
+-commutative26.8%
+-commutative26.8%
Simplified26.8%
Taylor expanded in z around inf 17.6%
associate--l+17.6%
Simplified17.6%
Taylor expanded in x around 0 17.1%
associate-+r+17.1%
distribute-lft-out17.1%
Simplified17.1%
Taylor expanded in x around inf 20.3%
if 2.55e17 < y Initial program 85.3%
associate-+l+85.3%
associate-+l-85.3%
associate-+l-85.3%
+-commutative85.3%
+-commutative85.3%
+-commutative85.3%
Simplified85.3%
Taylor expanded in t around inf 3.8%
associate--l+19.2%
+-commutative19.2%
+-commutative19.2%
Simplified19.2%
Taylor expanded in z around inf 17.2%
associate--l+17.2%
Simplified17.2%
Taylor expanded in y around inf 17.1%
Final simplification18.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 z))))
(if (<= y 1.1)
(+ 2.0 (- (* 0.5 (+ x t_1)) (+ (sqrt y) (sqrt x))))
(- (+ (sqrt (+ 1.0 x)) (* 0.5 t_1)) (sqrt x)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 / z));
double tmp;
if (y <= 1.1) {
tmp = 2.0 + ((0.5 * (x + t_1)) - (sqrt(y) + sqrt(x)));
} else {
tmp = (sqrt((1.0 + x)) + (0.5 * t_1)) - sqrt(x);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((1.0d0 / z))
if (y <= 1.1d0) then
tmp = 2.0d0 + ((0.5d0 * (x + t_1)) - (sqrt(y) + sqrt(x)))
else
tmp = (sqrt((1.0d0 + x)) + (0.5d0 * t_1)) - sqrt(x)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 / z));
double tmp;
if (y <= 1.1) {
tmp = 2.0 + ((0.5 * (x + t_1)) - (Math.sqrt(y) + Math.sqrt(x)));
} else {
tmp = (Math.sqrt((1.0 + x)) + (0.5 * t_1)) - Math.sqrt(x);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 / z)) tmp = 0 if y <= 1.1: tmp = 2.0 + ((0.5 * (x + t_1)) - (math.sqrt(y) + math.sqrt(x))) else: tmp = (math.sqrt((1.0 + x)) + (0.5 * t_1)) - math.sqrt(x) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 / z)) tmp = 0.0 if (y <= 1.1) tmp = Float64(2.0 + Float64(Float64(0.5 * Float64(x + t_1)) - Float64(sqrt(y) + sqrt(x)))); else tmp = Float64(Float64(sqrt(Float64(1.0 + x)) + Float64(0.5 * t_1)) - sqrt(x)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 / z));
tmp = 0.0;
if (y <= 1.1)
tmp = 2.0 + ((0.5 * (x + t_1)) - (sqrt(y) + sqrt(x)));
else
tmp = (sqrt((1.0 + x)) + (0.5 * t_1)) - sqrt(x);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 1.1], N[(2.0 + N[(N[(0.5 * N[(x + t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] + N[(0.5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{1}{z}}\\
\mathbf{if}\;y \leq 1.1:\\
\;\;\;\;2 + \left(0.5 \cdot \left(x + t\_1\right) - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{1 + x} + 0.5 \cdot t\_1\right) - \sqrt{x}\\
\end{array}
\end{array}
if y < 1.1000000000000001Initial program 97.2%
associate-+l+97.2%
associate-+l-66.4%
associate-+l-97.2%
+-commutative97.2%
+-commutative97.2%
+-commutative97.2%
Simplified97.2%
Taylor expanded in t around inf 23.6%
associate--l+27.6%
+-commutative27.6%
+-commutative27.6%
Simplified27.6%
Taylor expanded in z around inf 17.2%
associate--l+17.2%
Simplified17.2%
Taylor expanded in x around 0 16.7%
associate-+r+16.7%
distribute-lft-out16.7%
Simplified16.7%
Taylor expanded in y around 0 16.7%
associate--l+16.7%
+-commutative16.7%
Simplified16.7%
if 1.1000000000000001 < y Initial program 84.7%
associate-+l+84.7%
associate-+l-83.2%
associate-+l-84.7%
+-commutative84.7%
+-commutative84.7%
+-commutative84.7%
Simplified84.7%
Taylor expanded in t around inf 4.3%
associate--l+19.2%
+-commutative19.2%
+-commutative19.2%
Simplified19.2%
Taylor expanded in z around inf 17.5%
associate--l+17.5%
Simplified17.5%
Taylor expanded in y around inf 16.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 8500000.0) (- (sqrt (+ 1.0 x)) (sqrt x)) (/ (+ (* -0.125 (sqrt (/ 1.0 x))) (* (sqrt x) 0.5)) x)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 8500000.0) {
tmp = sqrt((1.0 + x)) - sqrt(x);
} else {
tmp = ((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / 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 <= 8500000.0d0) then
tmp = sqrt((1.0d0 + x)) - sqrt(x)
else
tmp = (((-0.125d0) * sqrt((1.0d0 / x))) + (sqrt(x) * 0.5d0)) / 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 <= 8500000.0) {
tmp = Math.sqrt((1.0 + x)) - Math.sqrt(x);
} else {
tmp = ((-0.125 * Math.sqrt((1.0 / x))) + (Math.sqrt(x) * 0.5)) / x;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 8500000.0: tmp = math.sqrt((1.0 + x)) - math.sqrt(x) else: tmp = ((-0.125 * math.sqrt((1.0 / x))) + (math.sqrt(x) * 0.5)) / x return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 8500000.0) tmp = Float64(sqrt(Float64(1.0 + x)) - sqrt(x)); else tmp = Float64(Float64(Float64(-0.125 * sqrt(Float64(1.0 / x))) + Float64(sqrt(x) * 0.5)) / 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 <= 8500000.0)
tmp = sqrt((1.0 + x)) - sqrt(x);
else
tmp = ((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / 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, 8500000.0], N[(N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.125 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[x], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8500000:\\
\;\;\;\;\sqrt{1 + x} - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}\\
\end{array}
\end{array}
if x < 8.5e6Initial program 96.9%
associate-+l+96.9%
associate-+l-96.9%
associate-+l-96.9%
+-commutative96.9%
+-commutative96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in t around inf 20.4%
associate--l+37.4%
+-commutative37.4%
+-commutative37.4%
Simplified37.4%
Taylor expanded in x around inf 26.4%
mul-1-neg26.4%
Simplified26.4%
unsub-neg26.4%
Applied egg-rr26.4%
if 8.5e6 < x Initial program 82.5%
associate-+l+82.5%
associate-+l-50.5%
associate-+l-82.5%
+-commutative82.5%
+-commutative82.5%
+-commutative82.5%
Simplified82.5%
Taylor expanded in t around inf 4.2%
associate--l+5.9%
+-commutative5.9%
+-commutative5.9%
Simplified5.9%
Taylor expanded in x around inf 3.4%
mul-1-neg3.4%
Simplified3.4%
Taylor expanded in x around inf 8.9%
Final simplification18.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x 8000000.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 <= 8000000.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 <= 8000000.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 <= 8000000.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 <= 8000000.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 <= 8000000.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 <= 8000000.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, 8000000.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 8000000:\\
\;\;\;\;\sqrt{1 + x} - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 8e6Initial program 96.9%
associate-+l+96.9%
associate-+l-96.9%
associate-+l-96.9%
+-commutative96.9%
+-commutative96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in t around inf 20.4%
associate--l+37.4%
+-commutative37.4%
+-commutative37.4%
Simplified37.4%
Taylor expanded in x around inf 26.4%
mul-1-neg26.4%
Simplified26.4%
unsub-neg26.4%
Applied egg-rr26.4%
if 8e6 < x Initial program 82.5%
associate-+l+82.5%
associate-+l-50.5%
associate-+l-82.5%
+-commutative82.5%
+-commutative82.5%
+-commutative82.5%
Simplified82.5%
Taylor expanded in t around inf 4.2%
associate--l+5.9%
+-commutative5.9%
+-commutative5.9%
Simplified5.9%
Taylor expanded in x around inf 3.4%
mul-1-neg3.4%
Simplified3.4%
Taylor expanded in x around inf 8.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x 1.35) (- (+ 1.0 (* x (+ 0.5 (* x (- (* x 0.0625) 0.125))))) (sqrt x)) (* 0.5 (sqrt (/ 1.0 x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.35) {
tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - sqrt(x);
} else {
tmp = 0.5 * sqrt((1.0 / x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= 1.35d0) then
tmp = (1.0d0 + (x * (0.5d0 + (x * ((x * 0.0625d0) - 0.125d0))))) - sqrt(x)
else
tmp = 0.5d0 * sqrt((1.0d0 / x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.35) {
tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - Math.sqrt(x);
} else {
tmp = 0.5 * Math.sqrt((1.0 / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 1.35: tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - math.sqrt(x) else: tmp = 0.5 * math.sqrt((1.0 / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 1.35) tmp = Float64(Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * Float64(Float64(x * 0.0625) - 0.125))))) - sqrt(x)); else tmp = Float64(0.5 * sqrt(Float64(1.0 / x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= 1.35)
tmp = (1.0 + (x * (0.5 + (x * ((x * 0.0625) - 0.125))))) - sqrt(x);
else
tmp = 0.5 * sqrt((1.0 / x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, 1.35], N[(N[(1.0 + N[(x * N[(0.5 + N[(x * N[(N[(x * 0.0625), $MachinePrecision] - 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35:\\
\;\;\;\;\left(1 + x \cdot \left(0.5 + x \cdot \left(x \cdot 0.0625 - 0.125\right)\right)\right) - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 1.3500000000000001Initial program 97.0%
associate-+l+97.0%
associate-+l-96.9%
associate-+l-97.0%
+-commutative97.0%
+-commutative97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in t around inf 20.0%
associate--l+37.2%
+-commutative37.2%
+-commutative37.2%
Simplified37.2%
Taylor expanded in x around inf 26.7%
mul-1-neg26.7%
Simplified26.7%
Taylor expanded in x around 0 26.3%
if 1.3500000000000001 < x Initial program 82.8%
associate-+l+82.8%
associate-+l-51.5%
associate-+l-82.8%
+-commutative82.8%
+-commutative82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in t around inf 5.0%
associate--l+6.9%
+-commutative6.9%
+-commutative6.9%
Simplified6.9%
Taylor expanded in x around inf 3.6%
mul-1-neg3.6%
Simplified3.6%
Taylor expanded in x around inf 9.0%
Final simplification18.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x 1.0) (+ 1.0 (- (* x (+ 0.5 (* x -0.125))) (sqrt x))) (* 0.5 (sqrt (/ 1.0 x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.0) {
tmp = 1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x));
} else {
tmp = 0.5 * sqrt((1.0 / x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= 1.0d0) then
tmp = 1.0d0 + ((x * (0.5d0 + (x * (-0.125d0)))) - sqrt(x))
else
tmp = 0.5d0 * sqrt((1.0d0 / x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.0) {
tmp = 1.0 + ((x * (0.5 + (x * -0.125))) - Math.sqrt(x));
} else {
tmp = 0.5 * Math.sqrt((1.0 / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 1.0: tmp = 1.0 + ((x * (0.5 + (x * -0.125))) - math.sqrt(x)) else: tmp = 0.5 * math.sqrt((1.0 / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 1.0) tmp = Float64(1.0 + Float64(Float64(x * Float64(0.5 + Float64(x * -0.125))) - sqrt(x))); else tmp = Float64(0.5 * sqrt(Float64(1.0 / x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= 1.0)
tmp = 1.0 + ((x * (0.5 + (x * -0.125))) - sqrt(x));
else
tmp = 0.5 * sqrt((1.0 / x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, 1.0], N[(1.0 + N[(N[(x * N[(0.5 + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $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 1:\\
\;\;\;\;1 + \left(x \cdot \left(0.5 + x \cdot -0.125\right) - \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 1Initial program 97.0%
associate-+l+97.0%
associate-+l-96.9%
associate-+l-97.0%
+-commutative97.0%
+-commutative97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in t around inf 20.0%
associate--l+37.2%
+-commutative37.2%
+-commutative37.2%
Simplified37.2%
Taylor expanded in x around inf 26.7%
mul-1-neg26.7%
Simplified26.7%
Taylor expanded in x around 0 26.1%
associate--l+26.1%
Simplified26.1%
if 1 < x Initial program 82.8%
associate-+l+82.8%
associate-+l-51.5%
associate-+l-82.8%
+-commutative82.8%
+-commutative82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in t around inf 5.0%
associate--l+6.9%
+-commutative6.9%
+-commutative6.9%
Simplified6.9%
Taylor expanded in x around inf 3.6%
mul-1-neg3.6%
Simplified3.6%
Taylor expanded in x around inf 9.0%
Final simplification18.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x 8.5) (+ 1.0 (- (* x 0.5) (sqrt x))) (* 0.5 (sqrt (/ 1.0 x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 8.5) {
tmp = 1.0 + ((x * 0.5) - sqrt(x));
} else {
tmp = 0.5 * sqrt((1.0 / x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= 8.5d0) then
tmp = 1.0d0 + ((x * 0.5d0) - sqrt(x))
else
tmp = 0.5d0 * sqrt((1.0d0 / x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 8.5) {
tmp = 1.0 + ((x * 0.5) - Math.sqrt(x));
} else {
tmp = 0.5 * Math.sqrt((1.0 / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 8.5: tmp = 1.0 + ((x * 0.5) - math.sqrt(x)) else: tmp = 0.5 * math.sqrt((1.0 / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 8.5) tmp = Float64(1.0 + Float64(Float64(x * 0.5) - sqrt(x))); else tmp = Float64(0.5 * sqrt(Float64(1.0 / x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= 8.5)
tmp = 1.0 + ((x * 0.5) - sqrt(x));
else
tmp = 0.5 * sqrt((1.0 / x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, 8.5], N[(1.0 + N[(N[(x * 0.5), $MachinePrecision] - N[Sqrt[x], $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 8.5:\\
\;\;\;\;1 + \left(x \cdot 0.5 - \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 8.5Initial program 97.0%
associate-+l+97.0%
associate-+l-96.9%
associate-+l-97.0%
+-commutative97.0%
+-commutative97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in t around inf 20.0%
associate--l+37.2%
+-commutative37.2%
+-commutative37.2%
Simplified37.2%
Taylor expanded in x around inf 26.7%
mul-1-neg26.7%
Simplified26.7%
Taylor expanded in x around 0 25.9%
associate--l+25.9%
Simplified25.9%
if 8.5 < x Initial program 82.8%
associate-+l+82.8%
associate-+l-51.5%
associate-+l-82.8%
+-commutative82.8%
+-commutative82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in t around inf 5.0%
associate--l+6.9%
+-commutative6.9%
+-commutative6.9%
Simplified6.9%
Taylor expanded in x around inf 3.6%
mul-1-neg3.6%
Simplified3.6%
Taylor expanded in x around inf 9.0%
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 0.024) (- 1.0 (sqrt x)) (* 0.5 (sqrt (/ 1.0 x)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 0.024) {
tmp = 1.0 - sqrt(x);
} else {
tmp = 0.5 * sqrt((1.0 / x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= 0.024d0) then
tmp = 1.0d0 - sqrt(x)
else
tmp = 0.5d0 * sqrt((1.0d0 / x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 0.024) {
tmp = 1.0 - Math.sqrt(x);
} else {
tmp = 0.5 * Math.sqrt((1.0 / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= 0.024: tmp = 1.0 - math.sqrt(x) else: tmp = 0.5 * math.sqrt((1.0 / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= 0.024) tmp = Float64(1.0 - sqrt(x)); else tmp = Float64(0.5 * sqrt(Float64(1.0 / x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= 0.024)
tmp = 1.0 - sqrt(x);
else
tmp = 0.5 * sqrt((1.0 / x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, 0.024], N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.024:\\
\;\;\;\;1 - \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 0.024Initial program 97.0%
associate-+l+97.0%
associate-+l-96.9%
associate-+l-97.0%
+-commutative97.0%
+-commutative97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in t around inf 20.0%
associate--l+37.2%
+-commutative37.2%
+-commutative37.2%
Simplified37.2%
Taylor expanded in x around inf 26.7%
mul-1-neg26.7%
Simplified26.7%
Taylor expanded in x around 0 25.5%
if 0.024 < x Initial program 82.8%
associate-+l+82.8%
associate-+l-51.5%
associate-+l-82.8%
+-commutative82.8%
+-commutative82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in t around inf 5.0%
associate--l+6.9%
+-commutative6.9%
+-commutative6.9%
Simplified6.9%
Taylor expanded in x around inf 3.6%
mul-1-neg3.6%
Simplified3.6%
Taylor expanded in x around inf 9.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (- 1.0 (sqrt x)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 - sqrt(x);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 1.0d0 - sqrt(x)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 - Math.sqrt(x);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 - math.sqrt(x)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 - sqrt(x)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 - sqrt(x);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 - \sqrt{x}
\end{array}
Initial program 90.3%
associate-+l+90.3%
associate-+l-75.7%
associate-+l-90.3%
+-commutative90.3%
+-commutative90.3%
+-commutative90.3%
Simplified90.3%
Taylor expanded in t around inf 13.0%
associate--l+23.0%
+-commutative23.0%
+-commutative23.0%
Simplified23.0%
Taylor expanded in x around inf 15.9%
mul-1-neg15.9%
Simplified15.9%
Taylor expanded in x around 0 14.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 x)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return -sqrt(x);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -sqrt(x)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return -Math.sqrt(x);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return -math.sqrt(x)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(-sqrt(x)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = -sqrt(x);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := (-N[Sqrt[x], $MachinePrecision])
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
-\sqrt{x}
\end{array}
Initial program 90.3%
associate-+l+90.3%
associate-+l-75.7%
associate-+l-90.3%
+-commutative90.3%
+-commutative90.3%
+-commutative90.3%
Simplified90.3%
Taylor expanded in t around inf 13.0%
associate--l+23.0%
+-commutative23.0%
+-commutative23.0%
Simplified23.0%
Taylor expanded in x around inf 15.9%
mul-1-neg15.9%
Simplified15.9%
Taylor expanded in x around 0 14.2%
Taylor expanded in x around inf 1.6%
neg-mul-11.6%
Simplified1.6%
(FPCore (x y z t)
:precision binary64
(+
(+
(+
(/ 1.0 (+ (sqrt (+ x 1.0)) (sqrt x)))
(/ 1.0 (+ (sqrt (+ y 1.0)) (sqrt y))))
(/ 1.0 (+ (sqrt (+ z 1.0)) (sqrt z))))
(- (sqrt (+ t 1.0)) (sqrt t))))
double code(double x, double y, double z, double t) {
return (((1.0 / (sqrt((x + 1.0)) + sqrt(x))) + (1.0 / (sqrt((y + 1.0)) + sqrt(y)))) + (1.0 / (sqrt((z + 1.0)) + sqrt(z)))) + (sqrt((t + 1.0)) - sqrt(t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((1.0d0 / (sqrt((x + 1.0d0)) + sqrt(x))) + (1.0d0 / (sqrt((y + 1.0d0)) + sqrt(y)))) + (1.0d0 / (sqrt((z + 1.0d0)) + sqrt(z)))) + (sqrt((t + 1.0d0)) - sqrt(t))
end function
public static double code(double x, double y, double z, double t) {
return (((1.0 / (Math.sqrt((x + 1.0)) + Math.sqrt(x))) + (1.0 / (Math.sqrt((y + 1.0)) + Math.sqrt(y)))) + (1.0 / (Math.sqrt((z + 1.0)) + Math.sqrt(z)))) + (Math.sqrt((t + 1.0)) - Math.sqrt(t));
}
def code(x, y, z, t): return (((1.0 / (math.sqrt((x + 1.0)) + math.sqrt(x))) + (1.0 / (math.sqrt((y + 1.0)) + math.sqrt(y)))) + (1.0 / (math.sqrt((z + 1.0)) + math.sqrt(z)))) + (math.sqrt((t + 1.0)) - math.sqrt(t))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(1.0 / Float64(sqrt(Float64(x + 1.0)) + sqrt(x))) + Float64(1.0 / Float64(sqrt(Float64(y + 1.0)) + sqrt(y)))) + Float64(1.0 / Float64(sqrt(Float64(z + 1.0)) + sqrt(z)))) + Float64(sqrt(Float64(t + 1.0)) - sqrt(t))) end
function tmp = code(x, y, z, t) tmp = (((1.0 / (sqrt((x + 1.0)) + sqrt(x))) + (1.0 / (sqrt((y + 1.0)) + sqrt(y)))) + (1.0 / (sqrt((z + 1.0)) + sqrt(z)))) + (sqrt((t + 1.0)) - sqrt(t)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(1.0 / N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sqrt[N[(z + 1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\frac{1}{\sqrt{x + 1} + \sqrt{x}} + \frac{1}{\sqrt{y + 1} + \sqrt{y}}\right) + \frac{1}{\sqrt{z + 1} + \sqrt{z}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right)
\end{array}
herbie shell --seed 2024114
(FPCore (x y z t)
:name "Main:z from "
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) (/ 1 (+ (sqrt (+ y 1)) (sqrt y)))) (/ 1 (+ (sqrt (+ z 1)) (sqrt z)))) (- (sqrt (+ t 1)) (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))))