
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (+ (+ (- (sqrt (+ x 1.0)) (sqrt x)) (- (sqrt (+ y 1.0)) (sqrt y))) (- (sqrt (+ z 1.0)) (sqrt z))) (- (sqrt (+ t 1.0)) (sqrt t))))
double code(double x, double y, double z, double t) {
return (((sqrt((x + 1.0)) - sqrt(x)) + (sqrt((y + 1.0)) - sqrt(y))) + (sqrt((z + 1.0)) - sqrt(z))) + (sqrt((t + 1.0)) - sqrt(t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((sqrt((x + 1.0d0)) - sqrt(x)) + (sqrt((y + 1.0d0)) - sqrt(y))) + (sqrt((z + 1.0d0)) - sqrt(z))) + (sqrt((t + 1.0d0)) - sqrt(t))
end function
public static double code(double x, double y, double z, double t) {
return (((Math.sqrt((x + 1.0)) - Math.sqrt(x)) + (Math.sqrt((y + 1.0)) - Math.sqrt(y))) + (Math.sqrt((z + 1.0)) - Math.sqrt(z))) + (Math.sqrt((t + 1.0)) - Math.sqrt(t));
}
def code(x, y, z, t): return (((math.sqrt((x + 1.0)) - math.sqrt(x)) + (math.sqrt((y + 1.0)) - math.sqrt(y))) + (math.sqrt((z + 1.0)) - math.sqrt(z))) + (math.sqrt((t + 1.0)) - math.sqrt(t))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(sqrt(Float64(x + 1.0)) - sqrt(x)) + Float64(sqrt(Float64(y + 1.0)) - sqrt(y))) + Float64(sqrt(Float64(z + 1.0)) - sqrt(z))) + Float64(sqrt(Float64(t + 1.0)) - sqrt(t))) end
function tmp = code(x, y, z, t) tmp = (((sqrt((x + 1.0)) - sqrt(x)) + (sqrt((y + 1.0)) - sqrt(y))) + (sqrt((z + 1.0)) - sqrt(z))) + (sqrt((t + 1.0)) - sqrt(t)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(y + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(z + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right)
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ 1.0 y)))
(t_2 (sqrt (+ 1.0 z)))
(t_3 (sqrt (+ x 1.0)))
(t_4 (sqrt (+ 1.0 t))))
(if (<= (- t_3 (sqrt x)) 0.9999999999995)
(+
(/ 1.0 (+ t_3 (sqrt x)))
(+ (- t_1 (sqrt y)) (+ t_4 (- (- t_2 (sqrt z)) (sqrt t)))))
(+
(+ (/ 1.0 (+ t_2 (sqrt z))) (+ 1.0 (/ 1.0 (+ t_1 (sqrt y)))))
(/ 1.0 (+ t_4 (sqrt t)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + y));
double t_2 = sqrt((1.0 + z));
double t_3 = sqrt((x + 1.0));
double t_4 = sqrt((1.0 + t));
double tmp;
if ((t_3 - sqrt(x)) <= 0.9999999999995) {
tmp = (1.0 / (t_3 + sqrt(x))) + ((t_1 - sqrt(y)) + (t_4 + ((t_2 - sqrt(z)) - sqrt(t))));
} else {
tmp = ((1.0 / (t_2 + sqrt(z))) + (1.0 + (1.0 / (t_1 + sqrt(y))))) + (1.0 / (t_4 + 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) :: tmp
t_1 = sqrt((1.0d0 + y))
t_2 = sqrt((1.0d0 + z))
t_3 = sqrt((x + 1.0d0))
t_4 = sqrt((1.0d0 + t))
if ((t_3 - sqrt(x)) <= 0.9999999999995d0) then
tmp = (1.0d0 / (t_3 + sqrt(x))) + ((t_1 - sqrt(y)) + (t_4 + ((t_2 - sqrt(z)) - sqrt(t))))
else
tmp = ((1.0d0 / (t_2 + sqrt(z))) + (1.0d0 + (1.0d0 / (t_1 + sqrt(y))))) + (1.0d0 / (t_4 + sqrt(t)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + y));
double t_2 = Math.sqrt((1.0 + z));
double t_3 = Math.sqrt((x + 1.0));
double t_4 = Math.sqrt((1.0 + t));
double tmp;
if ((t_3 - Math.sqrt(x)) <= 0.9999999999995) {
tmp = (1.0 / (t_3 + Math.sqrt(x))) + ((t_1 - Math.sqrt(y)) + (t_4 + ((t_2 - Math.sqrt(z)) - Math.sqrt(t))));
} else {
tmp = ((1.0 / (t_2 + Math.sqrt(z))) + (1.0 + (1.0 / (t_1 + Math.sqrt(y))))) + (1.0 / (t_4 + Math.sqrt(t)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + y)) t_2 = math.sqrt((1.0 + z)) t_3 = math.sqrt((x + 1.0)) t_4 = math.sqrt((1.0 + t)) tmp = 0 if (t_3 - math.sqrt(x)) <= 0.9999999999995: tmp = (1.0 / (t_3 + math.sqrt(x))) + ((t_1 - math.sqrt(y)) + (t_4 + ((t_2 - math.sqrt(z)) - math.sqrt(t)))) else: tmp = ((1.0 / (t_2 + math.sqrt(z))) + (1.0 + (1.0 / (t_1 + math.sqrt(y))))) + (1.0 / (t_4 + math.sqrt(t))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(1.0 + y)) t_2 = sqrt(Float64(1.0 + z)) t_3 = sqrt(Float64(x + 1.0)) t_4 = sqrt(Float64(1.0 + t)) tmp = 0.0 if (Float64(t_3 - sqrt(x)) <= 0.9999999999995) tmp = Float64(Float64(1.0 / Float64(t_3 + sqrt(x))) + Float64(Float64(t_1 - sqrt(y)) + Float64(t_4 + Float64(Float64(t_2 - sqrt(z)) - sqrt(t))))); else tmp = Float64(Float64(Float64(1.0 / Float64(t_2 + sqrt(z))) + Float64(1.0 + Float64(1.0 / Float64(t_1 + sqrt(y))))) + Float64(1.0 / Float64(t_4 + sqrt(t)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + y));
t_2 = sqrt((1.0 + z));
t_3 = sqrt((x + 1.0));
t_4 = sqrt((1.0 + t));
tmp = 0.0;
if ((t_3 - sqrt(x)) <= 0.9999999999995)
tmp = (1.0 / (t_3 + sqrt(x))) + ((t_1 - sqrt(y)) + (t_4 + ((t_2 - sqrt(z)) - sqrt(t))));
else
tmp = ((1.0 / (t_2 + sqrt(z))) + (1.0 + (1.0 / (t_1 + sqrt(y))))) + (1.0 / (t_4 + sqrt(t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$3 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision], 0.9999999999995], N[(N[(1.0 / N[(t$95$3 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] + N[(t$95$4 + N[(N[(t$95$2 - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / N[(t$95$2 + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(1.0 / N[(t$95$1 + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$4 + 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{1 + y}\\
t_2 := \sqrt{1 + z}\\
t_3 := \sqrt{x + 1}\\
t_4 := \sqrt{1 + t}\\
\mathbf{if}\;t_3 - \sqrt{x} \leq 0.9999999999995:\\
\;\;\;\;\frac{1}{t_3 + \sqrt{x}} + \left(\left(t_1 - \sqrt{y}\right) + \left(t_4 + \left(\left(t_2 - \sqrt{z}\right) - \sqrt{t}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{t_2 + \sqrt{z}} + \left(1 + \frac{1}{t_1 + \sqrt{y}}\right)\right) + \frac{1}{t_4 + \sqrt{t}}\\
\end{array}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ x 1.0))) (t_2 (sqrt (+ 1.0 y))))
(if (<= (+ (- t_1 (sqrt x)) (- t_2 (sqrt y))) 0.9999999999995)
(/ 1.0 (+ t_1 (sqrt x)))
(+
(+
(/ 1.0 (+ (sqrt (+ 1.0 z)) (sqrt z)))
(+ 1.0 (/ 1.0 (+ t_2 (sqrt y)))))
(/ 1.0 (+ (sqrt (+ 1.0 t)) (sqrt t)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0));
double t_2 = sqrt((1.0 + y));
double tmp;
if (((t_1 - sqrt(x)) + (t_2 - sqrt(y))) <= 0.9999999999995) {
tmp = 1.0 / (t_1 + sqrt(x));
} else {
tmp = ((1.0 / (sqrt((1.0 + z)) + sqrt(z))) + (1.0 + (1.0 / (t_2 + sqrt(y))))) + (1.0 / (sqrt((1.0 + t)) + sqrt(t)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((x + 1.0d0))
t_2 = sqrt((1.0d0 + y))
if (((t_1 - sqrt(x)) + (t_2 - sqrt(y))) <= 0.9999999999995d0) then
tmp = 1.0d0 / (t_1 + sqrt(x))
else
tmp = ((1.0d0 / (sqrt((1.0d0 + z)) + sqrt(z))) + (1.0d0 + (1.0d0 / (t_2 + sqrt(y))))) + (1.0d0 / (sqrt((1.0d0 + t)) + sqrt(t)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0));
double t_2 = Math.sqrt((1.0 + y));
double tmp;
if (((t_1 - Math.sqrt(x)) + (t_2 - Math.sqrt(y))) <= 0.9999999999995) {
tmp = 1.0 / (t_1 + Math.sqrt(x));
} else {
tmp = ((1.0 / (Math.sqrt((1.0 + z)) + Math.sqrt(z))) + (1.0 + (1.0 / (t_2 + Math.sqrt(y))))) + (1.0 / (Math.sqrt((1.0 + t)) + Math.sqrt(t)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) t_2 = math.sqrt((1.0 + y)) tmp = 0 if ((t_1 - math.sqrt(x)) + (t_2 - math.sqrt(y))) <= 0.9999999999995: tmp = 1.0 / (t_1 + math.sqrt(x)) else: tmp = ((1.0 / (math.sqrt((1.0 + z)) + math.sqrt(z))) + (1.0 + (1.0 / (t_2 + math.sqrt(y))))) + (1.0 / (math.sqrt((1.0 + t)) + math.sqrt(t))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(x + 1.0)) t_2 = sqrt(Float64(1.0 + y)) tmp = 0.0 if (Float64(Float64(t_1 - sqrt(x)) + Float64(t_2 - sqrt(y))) <= 0.9999999999995) tmp = Float64(1.0 / Float64(t_1 + sqrt(x))); else tmp = Float64(Float64(Float64(1.0 / Float64(sqrt(Float64(1.0 + z)) + sqrt(z))) + Float64(1.0 + Float64(1.0 / Float64(t_2 + sqrt(y))))) + Float64(1.0 / Float64(sqrt(Float64(1.0 + t)) + sqrt(t)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((x + 1.0));
t_2 = sqrt((1.0 + y));
tmp = 0.0;
if (((t_1 - sqrt(x)) + (t_2 - sqrt(y))) <= 0.9999999999995)
tmp = 1.0 / (t_1 + sqrt(x));
else
tmp = ((1.0 / (sqrt((1.0 + z)) + sqrt(z))) + (1.0 + (1.0 / (t_2 + sqrt(y))))) + (1.0 / (sqrt((1.0 + t)) + sqrt(t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$1 - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.9999999999995], N[(1.0 / N[(t$95$1 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(1.0 / N[(t$95$2 + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / 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{x + 1}\\
t_2 := \sqrt{1 + y}\\
\mathbf{if}\;\left(t_1 - \sqrt{x}\right) + \left(t_2 - \sqrt{y}\right) \leq 0.9999999999995:\\
\;\;\;\;\frac{1}{t_1 + \sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(1 + \frac{1}{t_2 + \sqrt{y}}\right)\right) + \frac{1}{\sqrt{1 + t} + \sqrt{t}}\\
\end{array}
\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
(if (<= y 2.4e+31)
(+
(+
(/ 1.0 (+ (sqrt (+ 1.0 z)) (sqrt z)))
(+ 1.0 (/ 1.0 (+ (sqrt (+ 1.0 y)) (sqrt y)))))
(- (sqrt (+ 1.0 t)) (sqrt t)))
(/ 1.0 (+ (sqrt (+ x 1.0)) (sqrt x)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.4e+31) {
tmp = ((1.0 / (sqrt((1.0 + z)) + sqrt(z))) + (1.0 + (1.0 / (sqrt((1.0 + y)) + sqrt(y))))) + (sqrt((1.0 + t)) - sqrt(t));
} else {
tmp = 1.0 / (sqrt((x + 1.0)) + sqrt(x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 2.4d+31) then
tmp = ((1.0d0 / (sqrt((1.0d0 + z)) + sqrt(z))) + (1.0d0 + (1.0d0 / (sqrt((1.0d0 + y)) + sqrt(y))))) + (sqrt((1.0d0 + t)) - sqrt(t))
else
tmp = 1.0d0 / (sqrt((x + 1.0d0)) + sqrt(x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.4e+31) {
tmp = ((1.0 / (Math.sqrt((1.0 + z)) + Math.sqrt(z))) + (1.0 + (1.0 / (Math.sqrt((1.0 + y)) + Math.sqrt(y))))) + (Math.sqrt((1.0 + t)) - Math.sqrt(t));
} else {
tmp = 1.0 / (Math.sqrt((x + 1.0)) + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= 2.4e+31: tmp = ((1.0 / (math.sqrt((1.0 + z)) + math.sqrt(z))) + (1.0 + (1.0 / (math.sqrt((1.0 + y)) + math.sqrt(y))))) + (math.sqrt((1.0 + t)) - math.sqrt(t)) else: tmp = 1.0 / (math.sqrt((x + 1.0)) + math.sqrt(x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= 2.4e+31) tmp = Float64(Float64(Float64(1.0 / Float64(sqrt(Float64(1.0 + z)) + sqrt(z))) + Float64(1.0 + Float64(1.0 / Float64(sqrt(Float64(1.0 + y)) + sqrt(y))))) + Float64(sqrt(Float64(1.0 + t)) - sqrt(t))); else tmp = Float64(1.0 / Float64(sqrt(Float64(x + 1.0)) + sqrt(x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= 2.4e+31)
tmp = ((1.0 / (sqrt((1.0 + z)) + sqrt(z))) + (1.0 + (1.0 / (sqrt((1.0 + y)) + sqrt(y))))) + (sqrt((1.0 + t)) - sqrt(t));
else
tmp = 1.0 / (sqrt((x + 1.0)) + sqrt(x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, 2.4e+31], N[(N[(N[(1.0 / N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(1.0 / N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] + N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Sqrt[N[(x + 1.0), $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 2.4 \cdot 10^{+31}:\\
\;\;\;\;\left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(1 + \frac{1}{\sqrt{1 + y} + \sqrt{y}}\right)\right) + \left(\sqrt{1 + t} - \sqrt{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{x + 1} + \sqrt{x}}\\
\end{array}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (sqrt (+ 1.0 y)) (sqrt y)))
(t_2 (- (sqrt (+ x 1.0)) (sqrt x))))
(if (<= t 2.4e+14)
(+ t_2 (+ t_1 (+ 1.0 (/ 1.0 (+ (sqrt (+ 1.0 t)) (sqrt t))))))
(+ t_2 (- t_1 (- (sqrt z) (sqrt (+ 1.0 z))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((1.0 + y)) - sqrt(y);
double t_2 = sqrt((x + 1.0)) - sqrt(x);
double tmp;
if (t <= 2.4e+14) {
tmp = t_2 + (t_1 + (1.0 + (1.0 / (sqrt((1.0 + t)) + sqrt(t)))));
} else {
tmp = t_2 + (t_1 - (sqrt(z) - sqrt((1.0 + z))));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((1.0d0 + y)) - sqrt(y)
t_2 = sqrt((x + 1.0d0)) - sqrt(x)
if (t <= 2.4d+14) then
tmp = t_2 + (t_1 + (1.0d0 + (1.0d0 / (sqrt((1.0d0 + t)) + sqrt(t)))))
else
tmp = t_2 + (t_1 - (sqrt(z) - sqrt((1.0d0 + z))))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((1.0 + y)) - Math.sqrt(y);
double t_2 = Math.sqrt((x + 1.0)) - Math.sqrt(x);
double tmp;
if (t <= 2.4e+14) {
tmp = t_2 + (t_1 + (1.0 + (1.0 / (Math.sqrt((1.0 + t)) + Math.sqrt(t)))));
} else {
tmp = t_2 + (t_1 - (Math.sqrt(z) - Math.sqrt((1.0 + z))));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((1.0 + y)) - math.sqrt(y) t_2 = math.sqrt((x + 1.0)) - math.sqrt(x) tmp = 0 if t <= 2.4e+14: tmp = t_2 + (t_1 + (1.0 + (1.0 / (math.sqrt((1.0 + t)) + math.sqrt(t))))) else: tmp = t_2 + (t_1 - (math.sqrt(z) - math.sqrt((1.0 + 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 + y)) - sqrt(y)) t_2 = Float64(sqrt(Float64(x + 1.0)) - sqrt(x)) tmp = 0.0 if (t <= 2.4e+14) tmp = Float64(t_2 + Float64(t_1 + Float64(1.0 + Float64(1.0 / Float64(sqrt(Float64(1.0 + t)) + sqrt(t)))))); else tmp = Float64(t_2 + Float64(t_1 - Float64(sqrt(z) - sqrt(Float64(1.0 + z))))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((1.0 + y)) - sqrt(y);
t_2 = sqrt((x + 1.0)) - sqrt(x);
tmp = 0.0;
if (t <= 2.4e+14)
tmp = t_2 + (t_1 + (1.0 + (1.0 / (sqrt((1.0 + t)) + sqrt(t)))));
else
tmp = t_2 + (t_1 - (sqrt(z) - sqrt((1.0 + z))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 2.4e+14], N[(t$95$2 + N[(t$95$1 + N[(1.0 + N[(1.0 / N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(t$95$1 - N[(N[Sqrt[z], $MachinePrecision] - N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{1 + y} - \sqrt{y}\\
t_2 := \sqrt{x + 1} - \sqrt{x}\\
\mathbf{if}\;t \leq 2.4 \cdot 10^{+14}:\\
\;\;\;\;t_2 + \left(t_1 + \left(1 + \frac{1}{\sqrt{1 + t} + \sqrt{t}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 + \left(t_1 - \left(\sqrt{z} - \sqrt{1 + z}\right)\right)\\
\end{array}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ x 1.0))))
(if (<= y 3.9e-28)
(+
(- (sqrt (+ 1.0 t)) (sqrt t))
(- (+ (/ 1.0 (+ (sqrt (+ 1.0 z)) (sqrt z))) (+ 1.0 t_1)) (sqrt x)))
(if (<= y 1e+19)
(- (+ t_1 (sqrt (+ 1.0 y))) (+ (sqrt y) (sqrt x)))
(/ 1.0 (+ t_1 (sqrt x)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0));
double tmp;
if (y <= 3.9e-28) {
tmp = (sqrt((1.0 + t)) - sqrt(t)) + (((1.0 / (sqrt((1.0 + z)) + sqrt(z))) + (1.0 + t_1)) - sqrt(x));
} else if (y <= 1e+19) {
tmp = (t_1 + sqrt((1.0 + y))) - (sqrt(y) + sqrt(x));
} else {
tmp = 1.0 / (t_1 + sqrt(x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((x + 1.0d0))
if (y <= 3.9d-28) then
tmp = (sqrt((1.0d0 + t)) - sqrt(t)) + (((1.0d0 / (sqrt((1.0d0 + z)) + sqrt(z))) + (1.0d0 + t_1)) - sqrt(x))
else if (y <= 1d+19) then
tmp = (t_1 + sqrt((1.0d0 + y))) - (sqrt(y) + sqrt(x))
else
tmp = 1.0d0 / (t_1 + sqrt(x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0));
double tmp;
if (y <= 3.9e-28) {
tmp = (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + (((1.0 / (Math.sqrt((1.0 + z)) + Math.sqrt(z))) + (1.0 + t_1)) - Math.sqrt(x));
} else if (y <= 1e+19) {
tmp = (t_1 + Math.sqrt((1.0 + y))) - (Math.sqrt(y) + Math.sqrt(x));
} else {
tmp = 1.0 / (t_1 + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) tmp = 0 if y <= 3.9e-28: tmp = (math.sqrt((1.0 + t)) - math.sqrt(t)) + (((1.0 / (math.sqrt((1.0 + z)) + math.sqrt(z))) + (1.0 + t_1)) - math.sqrt(x)) elif y <= 1e+19: tmp = (t_1 + math.sqrt((1.0 + y))) - (math.sqrt(y) + math.sqrt(x)) else: tmp = 1.0 / (t_1 + math.sqrt(x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(x + 1.0)) tmp = 0.0 if (y <= 3.9e-28) tmp = Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + Float64(Float64(Float64(1.0 / Float64(sqrt(Float64(1.0 + z)) + sqrt(z))) + Float64(1.0 + t_1)) - sqrt(x))); elseif (y <= 1e+19) tmp = Float64(Float64(t_1 + sqrt(Float64(1.0 + y))) - Float64(sqrt(y) + sqrt(x))); else tmp = Float64(1.0 / Float64(t_1 + sqrt(x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((x + 1.0));
tmp = 0.0;
if (y <= 3.9e-28)
tmp = (sqrt((1.0 + t)) - sqrt(t)) + (((1.0 / (sqrt((1.0 + z)) + sqrt(z))) + (1.0 + t_1)) - sqrt(x));
elseif (y <= 1e+19)
tmp = (t_1 + sqrt((1.0 + y))) - (sqrt(y) + sqrt(x));
else
tmp = 1.0 / (t_1 + sqrt(x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 3.9e-28], N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(1.0 / N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+19], N[(N[(t$95$1 + N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(t$95$1 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1}\\
\mathbf{if}\;y \leq 3.9 \cdot 10^{-28}:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + \left(\left(\frac{1}{\sqrt{1 + z} + \sqrt{z}} + \left(1 + t_1\right)\right) - \sqrt{x}\right)\\
\mathbf{elif}\;y \leq 10^{+19}:\\
\;\;\;\;\left(t_1 + \sqrt{1 + y}\right) - \left(\sqrt{y} + \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t_1 + \sqrt{x}}\\
\end{array}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (sqrt (+ x 1.0)) (sqrt x))))
(if (<= t 900000000000.0)
(+ t_1 (pow (cbrt (+ (/ 1.0 (+ (sqrt (+ 1.0 t)) (sqrt t))) 2.0)) 3.0))
(+ t_1 (- (- (sqrt (+ 1.0 y)) (sqrt y)) (- (sqrt z) (sqrt (+ 1.0 z))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0)) - sqrt(x);
double tmp;
if (t <= 900000000000.0) {
tmp = t_1 + pow(cbrt(((1.0 / (sqrt((1.0 + t)) + sqrt(t))) + 2.0)), 3.0);
} else {
tmp = t_1 + ((sqrt((1.0 + y)) - sqrt(y)) - (sqrt(z) - sqrt((1.0 + z))));
}
return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0)) - Math.sqrt(x);
double tmp;
if (t <= 900000000000.0) {
tmp = t_1 + Math.pow(Math.cbrt(((1.0 / (Math.sqrt((1.0 + t)) + Math.sqrt(t))) + 2.0)), 3.0);
} else {
tmp = t_1 + ((Math.sqrt((1.0 + y)) - Math.sqrt(y)) - (Math.sqrt(z) - Math.sqrt((1.0 + z))));
}
return tmp;
}
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(x + 1.0)) - sqrt(x)) tmp = 0.0 if (t <= 900000000000.0) tmp = Float64(t_1 + (cbrt(Float64(Float64(1.0 / Float64(sqrt(Float64(1.0 + t)) + sqrt(t))) + 2.0)) ^ 3.0)); else tmp = Float64(t_1 + Float64(Float64(sqrt(Float64(1.0 + y)) - sqrt(y)) - Float64(sqrt(z) - sqrt(Float64(1.0 + z))))); end return 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[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 900000000000.0], N[(t$95$1 + N[Power[N[Power[N[(N[(1.0 / N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] + N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[z], $MachinePrecision] - N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1} - \sqrt{x}\\
\mathbf{if}\;t \leq 900000000000:\\
\;\;\;\;t_1 + {\left(\sqrt[3]{\frac{1}{\sqrt{1 + t} + \sqrt{t}} + 2}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(\left(\sqrt{1 + y} - \sqrt{y}\right) - \left(\sqrt{z} - \sqrt{1 + z}\right)\right)\\
\end{array}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ x 1.0))))
(if (<= z 4.2e-31)
(+ (- (sqrt (+ 1.0 t)) (sqrt t)) 3.0)
(if (<= z 13500000000000.0)
(-
(+ 1.0 (+ t_1 (sqrt (+ 1.0 z))))
(+ (sqrt x) (/ (- z y) (- (sqrt z) (sqrt y)))))
(if (<= z 1.8e+219)
(+ t_1 (- (sqrt (+ 1.0 y)) (+ (sqrt y) (sqrt x))))
(/ 1.0 (+ t_1 (sqrt x))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0));
double tmp;
if (z <= 4.2e-31) {
tmp = (sqrt((1.0 + t)) - sqrt(t)) + 3.0;
} else if (z <= 13500000000000.0) {
tmp = (1.0 + (t_1 + sqrt((1.0 + z)))) - (sqrt(x) + ((z - y) / (sqrt(z) - sqrt(y))));
} else if (z <= 1.8e+219) {
tmp = t_1 + (sqrt((1.0 + y)) - (sqrt(y) + sqrt(x)));
} else {
tmp = 1.0 / (t_1 + sqrt(x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((x + 1.0d0))
if (z <= 4.2d-31) then
tmp = (sqrt((1.0d0 + t)) - sqrt(t)) + 3.0d0
else if (z <= 13500000000000.0d0) then
tmp = (1.0d0 + (t_1 + sqrt((1.0d0 + z)))) - (sqrt(x) + ((z - y) / (sqrt(z) - sqrt(y))))
else if (z <= 1.8d+219) then
tmp = t_1 + (sqrt((1.0d0 + y)) - (sqrt(y) + sqrt(x)))
else
tmp = 1.0d0 / (t_1 + sqrt(x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0));
double tmp;
if (z <= 4.2e-31) {
tmp = (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + 3.0;
} else if (z <= 13500000000000.0) {
tmp = (1.0 + (t_1 + Math.sqrt((1.0 + z)))) - (Math.sqrt(x) + ((z - y) / (Math.sqrt(z) - Math.sqrt(y))));
} else if (z <= 1.8e+219) {
tmp = t_1 + (Math.sqrt((1.0 + y)) - (Math.sqrt(y) + Math.sqrt(x)));
} else {
tmp = 1.0 / (t_1 + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) tmp = 0 if z <= 4.2e-31: tmp = (math.sqrt((1.0 + t)) - math.sqrt(t)) + 3.0 elif z <= 13500000000000.0: tmp = (1.0 + (t_1 + math.sqrt((1.0 + z)))) - (math.sqrt(x) + ((z - y) / (math.sqrt(z) - math.sqrt(y)))) elif z <= 1.8e+219: tmp = t_1 + (math.sqrt((1.0 + y)) - (math.sqrt(y) + math.sqrt(x))) else: tmp = 1.0 / (t_1 + math.sqrt(x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(x + 1.0)) tmp = 0.0 if (z <= 4.2e-31) tmp = Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + 3.0); elseif (z <= 13500000000000.0) tmp = Float64(Float64(1.0 + Float64(t_1 + sqrt(Float64(1.0 + z)))) - Float64(sqrt(x) + Float64(Float64(z - y) / Float64(sqrt(z) - sqrt(y))))); elseif (z <= 1.8e+219) tmp = Float64(t_1 + Float64(sqrt(Float64(1.0 + y)) - Float64(sqrt(y) + sqrt(x)))); else tmp = Float64(1.0 / Float64(t_1 + sqrt(x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((x + 1.0));
tmp = 0.0;
if (z <= 4.2e-31)
tmp = (sqrt((1.0 + t)) - sqrt(t)) + 3.0;
elseif (z <= 13500000000000.0)
tmp = (1.0 + (t_1 + sqrt((1.0 + z)))) - (sqrt(x) + ((z - y) / (sqrt(z) - sqrt(y))));
elseif (z <= 1.8e+219)
tmp = t_1 + (sqrt((1.0 + y)) - (sqrt(y) + sqrt(x)));
else
tmp = 1.0 / (t_1 + sqrt(x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, 4.2e-31], N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + 3.0), $MachinePrecision], If[LessEqual[z, 13500000000000.0], N[(N[(1.0 + N[(t$95$1 + N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[x], $MachinePrecision] + N[(N[(z - y), $MachinePrecision] / N[(N[Sqrt[z], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+219], N[(t$95$1 + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(t$95$1 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1}\\
\mathbf{if}\;z \leq 4.2 \cdot 10^{-31}:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\
\mathbf{elif}\;z \leq 13500000000000:\\
\;\;\;\;\left(1 + \left(t_1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \frac{z - y}{\sqrt{z} - \sqrt{y}}\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+219}:\\
\;\;\;\;t_1 + \left(\sqrt{1 + y} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t_1 + \sqrt{x}}\\
\end{array}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ x 1.0))))
(if (<= z 5.5e-28)
(+ (- (sqrt (+ 1.0 t)) (sqrt t)) 3.0)
(if (<= z 4.2e+29)
(+ 1.0 (+ (sqrt (+ 1.0 z)) (- t_1 (+ (sqrt z) (sqrt x)))))
(if (<= z 1.8e+219)
(+ t_1 (- (sqrt (+ 1.0 y)) (+ (sqrt y) (sqrt x))))
(/ 1.0 (+ t_1 (sqrt x))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0));
double tmp;
if (z <= 5.5e-28) {
tmp = (sqrt((1.0 + t)) - sqrt(t)) + 3.0;
} else if (z <= 4.2e+29) {
tmp = 1.0 + (sqrt((1.0 + z)) + (t_1 - (sqrt(z) + sqrt(x))));
} else if (z <= 1.8e+219) {
tmp = t_1 + (sqrt((1.0 + y)) - (sqrt(y) + sqrt(x)));
} else {
tmp = 1.0 / (t_1 + sqrt(x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((x + 1.0d0))
if (z <= 5.5d-28) then
tmp = (sqrt((1.0d0 + t)) - sqrt(t)) + 3.0d0
else if (z <= 4.2d+29) then
tmp = 1.0d0 + (sqrt((1.0d0 + z)) + (t_1 - (sqrt(z) + sqrt(x))))
else if (z <= 1.8d+219) then
tmp = t_1 + (sqrt((1.0d0 + y)) - (sqrt(y) + sqrt(x)))
else
tmp = 1.0d0 / (t_1 + sqrt(x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0));
double tmp;
if (z <= 5.5e-28) {
tmp = (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + 3.0;
} else if (z <= 4.2e+29) {
tmp = 1.0 + (Math.sqrt((1.0 + z)) + (t_1 - (Math.sqrt(z) + Math.sqrt(x))));
} else if (z <= 1.8e+219) {
tmp = t_1 + (Math.sqrt((1.0 + y)) - (Math.sqrt(y) + Math.sqrt(x)));
} else {
tmp = 1.0 / (t_1 + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) tmp = 0 if z <= 5.5e-28: tmp = (math.sqrt((1.0 + t)) - math.sqrt(t)) + 3.0 elif z <= 4.2e+29: tmp = 1.0 + (math.sqrt((1.0 + z)) + (t_1 - (math.sqrt(z) + math.sqrt(x)))) elif z <= 1.8e+219: tmp = t_1 + (math.sqrt((1.0 + y)) - (math.sqrt(y) + math.sqrt(x))) else: tmp = 1.0 / (t_1 + math.sqrt(x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(x + 1.0)) tmp = 0.0 if (z <= 5.5e-28) tmp = Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + 3.0); elseif (z <= 4.2e+29) tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 + z)) + Float64(t_1 - Float64(sqrt(z) + sqrt(x))))); elseif (z <= 1.8e+219) tmp = Float64(t_1 + Float64(sqrt(Float64(1.0 + y)) - Float64(sqrt(y) + sqrt(x)))); else tmp = Float64(1.0 / Float64(t_1 + sqrt(x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((x + 1.0));
tmp = 0.0;
if (z <= 5.5e-28)
tmp = (sqrt((1.0 + t)) - sqrt(t)) + 3.0;
elseif (z <= 4.2e+29)
tmp = 1.0 + (sqrt((1.0 + z)) + (t_1 - (sqrt(z) + sqrt(x))));
elseif (z <= 1.8e+219)
tmp = t_1 + (sqrt((1.0 + y)) - (sqrt(y) + sqrt(x)));
else
tmp = 1.0 / (t_1 + sqrt(x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, 5.5e-28], N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + 3.0), $MachinePrecision], If[LessEqual[z, 4.2e+29], N[(1.0 + N[(N[Sqrt[N[(1.0 + z), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 - N[(N[Sqrt[z], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+219], N[(t$95$1 + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(t$95$1 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1}\\
\mathbf{if}\;z \leq 5.5 \cdot 10^{-28}:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+29}:\\
\;\;\;\;1 + \left(\sqrt{1 + z} + \left(t_1 - \left(\sqrt{z} + \sqrt{x}\right)\right)\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+219}:\\
\;\;\;\;t_1 + \left(\sqrt{1 + y} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t_1 + \sqrt{x}}\\
\end{array}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (+ x 1.0))))
(if (<= z 0.56)
(+ (- (sqrt (+ 1.0 t)) (sqrt t)) 3.0)
(if (<= z 1.8e+219)
(+ t_1 (- (sqrt (+ 1.0 y)) (+ (sqrt y) (sqrt x))))
(/ 1.0 (+ t_1 (sqrt x)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0));
double tmp;
if (z <= 0.56) {
tmp = (sqrt((1.0 + t)) - sqrt(t)) + 3.0;
} else if (z <= 1.8e+219) {
tmp = t_1 + (sqrt((1.0 + y)) - (sqrt(y) + sqrt(x)));
} else {
tmp = 1.0 / (t_1 + sqrt(x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((x + 1.0d0))
if (z <= 0.56d0) then
tmp = (sqrt((1.0d0 + t)) - sqrt(t)) + 3.0d0
else if (z <= 1.8d+219) then
tmp = t_1 + (sqrt((1.0d0 + y)) - (sqrt(y) + sqrt(x)))
else
tmp = 1.0d0 / (t_1 + sqrt(x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((x + 1.0));
double tmp;
if (z <= 0.56) {
tmp = (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + 3.0;
} else if (z <= 1.8e+219) {
tmp = t_1 + (Math.sqrt((1.0 + y)) - (Math.sqrt(y) + Math.sqrt(x)));
} else {
tmp = 1.0 / (t_1 + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) tmp = 0 if z <= 0.56: tmp = (math.sqrt((1.0 + t)) - math.sqrt(t)) + 3.0 elif z <= 1.8e+219: tmp = t_1 + (math.sqrt((1.0 + y)) - (math.sqrt(y) + math.sqrt(x))) else: tmp = 1.0 / (t_1 + math.sqrt(x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = sqrt(Float64(x + 1.0)) tmp = 0.0 if (z <= 0.56) tmp = Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + 3.0); elseif (z <= 1.8e+219) tmp = Float64(t_1 + Float64(sqrt(Float64(1.0 + y)) - Float64(sqrt(y) + sqrt(x)))); else tmp = Float64(1.0 / Float64(t_1 + sqrt(x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((x + 1.0));
tmp = 0.0;
if (z <= 0.56)
tmp = (sqrt((1.0 + t)) - sqrt(t)) + 3.0;
elseif (z <= 1.8e+219)
tmp = t_1 + (sqrt((1.0 + y)) - (sqrt(y) + sqrt(x)));
else
tmp = 1.0 / (t_1 + sqrt(x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, 0.56], N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + 3.0), $MachinePrecision], If[LessEqual[z, 1.8e+219], N[(t$95$1 + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[(N[Sqrt[y], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(t$95$1 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1}\\
\mathbf{if}\;z \leq 0.56:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+219}:\\
\;\;\;\;t_1 + \left(\sqrt{1 + y} - \left(\sqrt{y} + \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t_1 + \sqrt{x}}\\
\end{array}
\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
(if (<= z 0.56)
(+ (- (sqrt (+ 1.0 t)) (sqrt t)) 3.0)
(if (<= z 1.8e+219)
(+ 1.0 (- (sqrt (+ 1.0 y)) (sqrt y)))
(/ 1.0 (+ (sqrt (+ x 1.0)) (sqrt x))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 0.56) {
tmp = (sqrt((1.0 + t)) - sqrt(t)) + 3.0;
} else if (z <= 1.8e+219) {
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
} else {
tmp = 1.0 / (sqrt((x + 1.0)) + sqrt(x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= 0.56d0) then
tmp = (sqrt((1.0d0 + t)) - sqrt(t)) + 3.0d0
else if (z <= 1.8d+219) then
tmp = 1.0d0 + (sqrt((1.0d0 + y)) - sqrt(y))
else
tmp = 1.0d0 / (sqrt((x + 1.0d0)) + sqrt(x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= 0.56) {
tmp = (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + 3.0;
} else if (z <= 1.8e+219) {
tmp = 1.0 + (Math.sqrt((1.0 + y)) - Math.sqrt(y));
} else {
tmp = 1.0 / (Math.sqrt((x + 1.0)) + Math.sqrt(x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 0.56: tmp = (math.sqrt((1.0 + t)) - math.sqrt(t)) + 3.0 elif z <= 1.8e+219: tmp = 1.0 + (math.sqrt((1.0 + y)) - math.sqrt(y)) else: tmp = 1.0 / (math.sqrt((x + 1.0)) + math.sqrt(x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= 0.56) tmp = Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + 3.0); elseif (z <= 1.8e+219) tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 + y)) - sqrt(y))); else tmp = Float64(1.0 / Float64(sqrt(Float64(x + 1.0)) + sqrt(x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= 0.56)
tmp = (sqrt((1.0 + t)) - sqrt(t)) + 3.0;
elseif (z <= 1.8e+219)
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
else
tmp = 1.0 / (sqrt((x + 1.0)) + sqrt(x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, 0.56], N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + 3.0), $MachinePrecision], If[LessEqual[z, 1.8e+219], N[(1.0 + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 0.56:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+219}:\\
\;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{x + 1} + \sqrt{x}}\\
\end{array}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (- (sqrt (+ x 1.0)) (sqrt x)))) (if (<= y 3.9) (+ 1.0 t_1) t_1)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = sqrt((x + 1.0)) - sqrt(x);
double tmp;
if (y <= 3.9) {
tmp = 1.0 + t_1;
} else {
tmp = 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((x + 1.0d0)) - sqrt(x)
if (y <= 3.9d0) then
tmp = 1.0d0 + t_1
else
tmp = 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((x + 1.0)) - Math.sqrt(x);
double tmp;
if (y <= 3.9) {
tmp = 1.0 + t_1;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = math.sqrt((x + 1.0)) - math.sqrt(x) tmp = 0 if y <= 3.9: tmp = 1.0 + t_1 else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(sqrt(Float64(x + 1.0)) - sqrt(x)) tmp = 0.0 if (y <= 3.9) tmp = Float64(1.0 + t_1); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = sqrt((x + 1.0)) - sqrt(x);
tmp = 0.0;
if (y <= 3.9)
tmp = 1.0 + t_1;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 3.9], N[(1.0 + t$95$1), $MachinePrecision], t$95$1]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \sqrt{x + 1} - \sqrt{x}\\
\mathbf{if}\;y \leq 3.9:\\
\;\;\;\;1 + t_1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\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 (if (<= z 0.56) (+ (- (sqrt (+ 1.0 t)) (sqrt t)) 3.0) (+ 1.0 (- (sqrt (+ 1.0 y)) (sqrt y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 0.56) {
tmp = (sqrt((1.0 + t)) - sqrt(t)) + 3.0;
} else {
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= 0.56d0) then
tmp = (sqrt((1.0d0 + t)) - sqrt(t)) + 3.0d0
else
tmp = 1.0d0 + (sqrt((1.0d0 + y)) - sqrt(y))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= 0.56) {
tmp = (Math.sqrt((1.0 + t)) - Math.sqrt(t)) + 3.0;
} else {
tmp = 1.0 + (Math.sqrt((1.0 + y)) - Math.sqrt(y));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 0.56: tmp = (math.sqrt((1.0 + t)) - math.sqrt(t)) + 3.0 else: tmp = 1.0 + (math.sqrt((1.0 + y)) - math.sqrt(y)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= 0.56) tmp = Float64(Float64(sqrt(Float64(1.0 + t)) - sqrt(t)) + 3.0); else tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 + y)) - sqrt(y))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= 0.56)
tmp = (sqrt((1.0 + t)) - sqrt(t)) + 3.0;
else
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, 0.56], N[(N[(N[Sqrt[N[(1.0 + t), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + 3.0), $MachinePrecision], N[(1.0 + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 0.56:\\
\;\;\;\;\left(\sqrt{1 + t} - \sqrt{t}\right) + 3\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\sqrt{1 + y} - \sqrt{y}\right)\\
\end{array}
\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 (+ 1.0 (- (sqrt (+ 1.0 y)) (sqrt y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 + (sqrt((1.0 + y)) - sqrt(y));
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 1.0d0 + (sqrt((1.0d0 + y)) - sqrt(y))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 + (Math.sqrt((1.0 + y)) - Math.sqrt(y));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 + (math.sqrt((1.0 + y)) - math.sqrt(y))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 + Float64(sqrt(Float64(1.0 + y)) - sqrt(y))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 + (sqrt((1.0 + y)) - sqrt(y));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 + N[(N[Sqrt[N[(1.0 + y), $MachinePrecision]], $MachinePrecision] - N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 + \left(\sqrt{1 + y} - \sqrt{y}\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 (- (sqrt (+ x 1.0)) (sqrt x)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return sqrt((x + 1.0)) - sqrt(x);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = sqrt((x + 1.0d0)) - sqrt(x)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return Math.sqrt((x + 1.0)) - Math.sqrt(x);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return math.sqrt((x + 1.0)) - math.sqrt(x)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(sqrt(Float64(x + 1.0)) - sqrt(x)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = sqrt((x + 1.0)) - sqrt(x);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\sqrt{x + 1} - \sqrt{x}
\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 (- (+ 1.0 (* x 0.5)) (sqrt x)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (1.0 + (x * 0.5)) - 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 + (x * 0.5d0)) - 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 + (x * 0.5)) - Math.sqrt(x);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (1.0 + (x * 0.5)) - math.sqrt(x)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(1.0 + Float64(x * 0.5)) - sqrt(x)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (1.0 + (x * 0.5)) - sqrt(x);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\left(1 + x \cdot 0.5\right) - \sqrt{x}
\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 1.0)
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0;
}
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
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return 1.0 end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1
\end{array}
(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 2023350
(FPCore (x y z t)
:name "Main:z from "
:precision binary64
:herbie-target
(+ (+ (+ (/ 1.0 (+ (sqrt (+ x 1.0)) (sqrt x))) (/ 1.0 (+ (sqrt (+ y 1.0)) (sqrt y)))) (/ 1.0 (+ (sqrt (+ z 1.0)) (sqrt z)))) (- (sqrt (+ t 1.0)) (sqrt t)))
(+ (+ (+ (- (sqrt (+ x 1.0)) (sqrt x)) (- (sqrt (+ y 1.0)) (sqrt y))) (- (sqrt (+ z 1.0)) (sqrt z))) (- (sqrt (+ t 1.0)) (sqrt t))))