
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (/ (* (/ x (+ x y)) (/ y (+ (+ x y) 1.0))) (+ x y)))
assert(x < y);
double code(double x, double y) {
return ((x / (x + y)) * (y / ((x + y) + 1.0))) / (x + y);
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / (x + y)) * (y / ((x + y) + 1.0d0))) / (x + y)
end function
assert x < y;
public static double code(double x, double y) {
return ((x / (x + y)) * (y / ((x + y) + 1.0))) / (x + y);
}
[x, y] = sort([x, y]) def code(x, y): return ((x / (x + y)) * (y / ((x + y) + 1.0))) / (x + y)
x, y = sort([x, y]) function code(x, y) return Float64(Float64(Float64(x / Float64(x + y)) * Float64(y / Float64(Float64(x + y) + 1.0))) / Float64(x + y)) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = ((x / (x + y)) * (y / ((x + y) + 1.0))) / (x + y);
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}
\end{array}
Initial program 73.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Final simplification99.9%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ (+ x y) 1.0)))
(if (<= y 2.9e-133)
(/ (* 1.0 (/ y t_0)) (+ x y))
(if (<= y 2.45e+79)
(/ (* x y) (* (* (+ x y) (+ x y)) t_0))
(/ (* 1.0 (/ x (+ x y))) (+ x y))))))assert(x < y);
double code(double x, double y) {
double t_0 = (x + y) + 1.0;
double tmp;
if (y <= 2.9e-133) {
tmp = (1.0 * (y / t_0)) / (x + y);
} else if (y <= 2.45e+79) {
tmp = (x * y) / (((x + y) * (x + y)) * t_0);
} else {
tmp = (1.0 * (x / (x + y))) / (x + y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (x + y) + 1.0d0
if (y <= 2.9d-133) then
tmp = (1.0d0 * (y / t_0)) / (x + y)
else if (y <= 2.45d+79) then
tmp = (x * y) / (((x + y) * (x + y)) * t_0)
else
tmp = (1.0d0 * (x / (x + y))) / (x + y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = (x + y) + 1.0;
double tmp;
if (y <= 2.9e-133) {
tmp = (1.0 * (y / t_0)) / (x + y);
} else if (y <= 2.45e+79) {
tmp = (x * y) / (((x + y) * (x + y)) * t_0);
} else {
tmp = (1.0 * (x / (x + y))) / (x + y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = (x + y) + 1.0 tmp = 0 if y <= 2.9e-133: tmp = (1.0 * (y / t_0)) / (x + y) elif y <= 2.45e+79: tmp = (x * y) / (((x + y) * (x + y)) * t_0) else: tmp = (1.0 * (x / (x + y))) / (x + y) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(Float64(x + y) + 1.0) tmp = 0.0 if (y <= 2.9e-133) tmp = Float64(Float64(1.0 * Float64(y / t_0)) / Float64(x + y)); elseif (y <= 2.45e+79) tmp = Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * t_0)); else tmp = Float64(Float64(1.0 * Float64(x / Float64(x + y))) / Float64(x + y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = (x + y) + 1.0;
tmp = 0.0;
if (y <= 2.9e-133)
tmp = (1.0 * (y / t_0)) / (x + y);
elseif (y <= 2.45e+79)
tmp = (x * y) / (((x + y) * (x + y)) * t_0);
else
tmp = (1.0 * (x / (x + y))) / (x + y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[y, 2.9e-133], N[(N[(1.0 * N[(y / t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.45e+79], N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \left(x + y\right) + 1\\
\mathbf{if}\;y \leq 2.9 \cdot 10^{-133}:\\
\;\;\;\;\frac{1 \cdot \frac{y}{t\_0}}{x + y}\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{+79}:\\
\;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot \frac{x}{x + y}}{x + y}\\
\end{array}
\end{array}
if y < 2.8999999999999998e-133Initial program 72.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites56.9%
if 2.8999999999999998e-133 < y < 2.4499999999999999e79Initial program 90.0%
if 2.4499999999999999e79 < y Initial program 60.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in y around inf
Applied rewrites86.0%
Final simplification68.7%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ (+ x y) 1.0)))
(if (<= x -1.95e+158)
(/ (* 1.0 (/ y t_0)) (+ x y))
(/ (* (/ y (+ x y)) x) (* t_0 (+ x y))))))assert(x < y);
double code(double x, double y) {
double t_0 = (x + y) + 1.0;
double tmp;
if (x <= -1.95e+158) {
tmp = (1.0 * (y / t_0)) / (x + y);
} else {
tmp = ((y / (x + y)) * x) / (t_0 * (x + y));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (x + y) + 1.0d0
if (x <= (-1.95d+158)) then
tmp = (1.0d0 * (y / t_0)) / (x + y)
else
tmp = ((y / (x + y)) * x) / (t_0 * (x + y))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = (x + y) + 1.0;
double tmp;
if (x <= -1.95e+158) {
tmp = (1.0 * (y / t_0)) / (x + y);
} else {
tmp = ((y / (x + y)) * x) / (t_0 * (x + y));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = (x + y) + 1.0 tmp = 0 if x <= -1.95e+158: tmp = (1.0 * (y / t_0)) / (x + y) else: tmp = ((y / (x + y)) * x) / (t_0 * (x + y)) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(Float64(x + y) + 1.0) tmp = 0.0 if (x <= -1.95e+158) tmp = Float64(Float64(1.0 * Float64(y / t_0)) / Float64(x + y)); else tmp = Float64(Float64(Float64(y / Float64(x + y)) * x) / Float64(t_0 * Float64(x + y))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = (x + y) + 1.0;
tmp = 0.0;
if (x <= -1.95e+158)
tmp = (1.0 * (y / t_0)) / (x + y);
else
tmp = ((y / (x + y)) * x) / (t_0 * (x + y));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x, -1.95e+158], N[(N[(1.0 * N[(y / t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / N[(t$95$0 * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \left(x + y\right) + 1\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{+158}:\\
\;\;\;\;\frac{1 \cdot \frac{y}{t\_0}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x + y} \cdot x}{t\_0 \cdot \left(x + y\right)}\\
\end{array}
\end{array}
if x < -1.95e158Initial program 59.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites90.7%
if -1.95e158 < x Initial program 75.7%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6496.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6496.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6496.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6496.3
Applied rewrites96.3%
Final simplification95.7%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ (+ x y) 1.0)))
(if (<= x -1.95e+158)
(/ (* 1.0 (/ y t_0)) (+ x y))
(* (/ y (* t_0 (+ x y))) (/ x (+ x y))))))assert(x < y);
double code(double x, double y) {
double t_0 = (x + y) + 1.0;
double tmp;
if (x <= -1.95e+158) {
tmp = (1.0 * (y / t_0)) / (x + y);
} else {
tmp = (y / (t_0 * (x + y))) * (x / (x + y));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (x + y) + 1.0d0
if (x <= (-1.95d+158)) then
tmp = (1.0d0 * (y / t_0)) / (x + y)
else
tmp = (y / (t_0 * (x + y))) * (x / (x + y))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = (x + y) + 1.0;
double tmp;
if (x <= -1.95e+158) {
tmp = (1.0 * (y / t_0)) / (x + y);
} else {
tmp = (y / (t_0 * (x + y))) * (x / (x + y));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = (x + y) + 1.0 tmp = 0 if x <= -1.95e+158: tmp = (1.0 * (y / t_0)) / (x + y) else: tmp = (y / (t_0 * (x + y))) * (x / (x + y)) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(Float64(x + y) + 1.0) tmp = 0.0 if (x <= -1.95e+158) tmp = Float64(Float64(1.0 * Float64(y / t_0)) / Float64(x + y)); else tmp = Float64(Float64(y / Float64(t_0 * Float64(x + y))) * Float64(x / Float64(x + y))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = (x + y) + 1.0;
tmp = 0.0;
if (x <= -1.95e+158)
tmp = (1.0 * (y / t_0)) / (x + y);
else
tmp = (y / (t_0 * (x + y))) * (x / (x + y));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x, -1.95e+158], N[(N[(1.0 * N[(y / t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(t$95$0 * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \left(x + y\right) + 1\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{+158}:\\
\;\;\;\;\frac{1 \cdot \frac{y}{t\_0}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t\_0 \cdot \left(x + y\right)} \cdot \frac{x}{x + y}\\
\end{array}
\end{array}
if x < -1.95e158Initial program 59.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites90.7%
if -1.95e158 < x Initial program 75.7%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6496.3
lift-+.f64N/A
+-commutativeN/A
Applied rewrites96.3%
Final simplification95.6%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (* (/ (/ y (+ (+ x y) 1.0)) (+ x y)) (/ x (+ x y))))
assert(x < y);
double code(double x, double y) {
return ((y / ((x + y) + 1.0)) / (x + y)) * (x / (x + y));
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((y / ((x + y) + 1.0d0)) / (x + y)) * (x / (x + y))
end function
assert x < y;
public static double code(double x, double y) {
return ((y / ((x + y) + 1.0)) / (x + y)) * (x / (x + y));
}
[x, y] = sort([x, y]) def code(x, y): return ((y / ((x + y) + 1.0)) / (x + y)) * (x / (x + y))
x, y = sort([x, y]) function code(x, y) return Float64(Float64(Float64(y / Float64(Float64(x + y) + 1.0)) / Float64(x + y)) * Float64(x / Float64(x + y))) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = ((y / ((x + y) + 1.0)) / (x + y)) * (x / (x + y));
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(N[(N[(y / N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{y}{\left(x + y\right) + 1}}{x + y} \cdot \frac{x}{x + y}
\end{array}
Initial program 73.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lower-/.f6499.8
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.8
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.8
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.8
Applied rewrites99.8%
Final simplification99.8%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ (+ x y) 1.0)))
(if (<= y 1.12e-114)
(/ (* 1.0 (/ y t_0)) (+ x y))
(if (<= y 2.9e+146)
(/ (* 1.0 x) (* t_0 (+ x y)))
(/ (* 1.0 (/ x (+ x y))) (+ x y))))))assert(x < y);
double code(double x, double y) {
double t_0 = (x + y) + 1.0;
double tmp;
if (y <= 1.12e-114) {
tmp = (1.0 * (y / t_0)) / (x + y);
} else if (y <= 2.9e+146) {
tmp = (1.0 * x) / (t_0 * (x + y));
} else {
tmp = (1.0 * (x / (x + y))) / (x + y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (x + y) + 1.0d0
if (y <= 1.12d-114) then
tmp = (1.0d0 * (y / t_0)) / (x + y)
else if (y <= 2.9d+146) then
tmp = (1.0d0 * x) / (t_0 * (x + y))
else
tmp = (1.0d0 * (x / (x + y))) / (x + y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = (x + y) + 1.0;
double tmp;
if (y <= 1.12e-114) {
tmp = (1.0 * (y / t_0)) / (x + y);
} else if (y <= 2.9e+146) {
tmp = (1.0 * x) / (t_0 * (x + y));
} else {
tmp = (1.0 * (x / (x + y))) / (x + y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = (x + y) + 1.0 tmp = 0 if y <= 1.12e-114: tmp = (1.0 * (y / t_0)) / (x + y) elif y <= 2.9e+146: tmp = (1.0 * x) / (t_0 * (x + y)) else: tmp = (1.0 * (x / (x + y))) / (x + y) return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(Float64(x + y) + 1.0) tmp = 0.0 if (y <= 1.12e-114) tmp = Float64(Float64(1.0 * Float64(y / t_0)) / Float64(x + y)); elseif (y <= 2.9e+146) tmp = Float64(Float64(1.0 * x) / Float64(t_0 * Float64(x + y))); else tmp = Float64(Float64(1.0 * Float64(x / Float64(x + y))) / Float64(x + y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = (x + y) + 1.0;
tmp = 0.0;
if (y <= 1.12e-114)
tmp = (1.0 * (y / t_0)) / (x + y);
elseif (y <= 2.9e+146)
tmp = (1.0 * x) / (t_0 * (x + y));
else
tmp = (1.0 * (x / (x + y))) / (x + y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[y, 1.12e-114], N[(N[(1.0 * N[(y / t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+146], N[(N[(1.0 * x), $MachinePrecision] / N[(t$95$0 * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \left(x + y\right) + 1\\
\mathbf{if}\;y \leq 1.12 \cdot 10^{-114}:\\
\;\;\;\;\frac{1 \cdot \frac{y}{t\_0}}{x + y}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+146}:\\
\;\;\;\;\frac{1 \cdot x}{t\_0 \cdot \left(x + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot \frac{x}{x + y}}{x + y}\\
\end{array}
\end{array}
if y < 1.11999999999999995e-114Initial program 73.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites57.9%
if 1.11999999999999995e-114 < y < 2.8999999999999998e146Initial program 74.5%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6495.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.4
Applied rewrites95.4%
Taylor expanded in y around inf
Applied rewrites79.1%
if 2.8999999999999998e146 < y Initial program 75.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites100.0%
Taylor expanded in y around inf
Applied rewrites100.0%
Final simplification68.2%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(if (<= y 1.12e-114)
(/ (/ y (+ x 1.0)) (+ x y))
(if (<= y 2.9e+146)
(/ (* 1.0 x) (* (+ (+ x y) 1.0) (+ x y)))
(/ (* 1.0 (/ x (+ x y))) (+ x y)))))assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.12e-114) {
tmp = (y / (x + 1.0)) / (x + y);
} else if (y <= 2.9e+146) {
tmp = (1.0 * x) / (((x + y) + 1.0) * (x + y));
} else {
tmp = (1.0 * (x / (x + y))) / (x + y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.12d-114) then
tmp = (y / (x + 1.0d0)) / (x + y)
else if (y <= 2.9d+146) then
tmp = (1.0d0 * x) / (((x + y) + 1.0d0) * (x + y))
else
tmp = (1.0d0 * (x / (x + y))) / (x + y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.12e-114) {
tmp = (y / (x + 1.0)) / (x + y);
} else if (y <= 2.9e+146) {
tmp = (1.0 * x) / (((x + y) + 1.0) * (x + y));
} else {
tmp = (1.0 * (x / (x + y))) / (x + y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.12e-114: tmp = (y / (x + 1.0)) / (x + y) elif y <= 2.9e+146: tmp = (1.0 * x) / (((x + y) + 1.0) * (x + y)) else: tmp = (1.0 * (x / (x + y))) / (x + y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.12e-114) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(x + y)); elseif (y <= 2.9e+146) tmp = Float64(Float64(1.0 * x) / Float64(Float64(Float64(x + y) + 1.0) * Float64(x + y))); else tmp = Float64(Float64(1.0 * Float64(x / Float64(x + y))) / Float64(x + y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.12e-114)
tmp = (y / (x + 1.0)) / (x + y);
elseif (y <= 2.9e+146)
tmp = (1.0 * x) / (((x + y) + 1.0) * (x + y));
else
tmp = (1.0 * (x / (x + y))) / (x + y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 1.12e-114], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+146], N[(N[(1.0 * x), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.12 \cdot 10^{-114}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{x + y}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+146}:\\
\;\;\;\;\frac{1 \cdot x}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot \frac{x}{x + y}}{x + y}\\
\end{array}
\end{array}
if y < 1.11999999999999995e-114Initial program 73.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
lower-/.f64N/A
+-commutativeN/A
lower-+.f6457.1
Applied rewrites57.1%
if 1.11999999999999995e-114 < y < 2.8999999999999998e146Initial program 74.5%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6495.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.4
Applied rewrites95.4%
Taylor expanded in y around inf
Applied rewrites79.1%
if 2.8999999999999998e146 < y Initial program 75.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites100.0%
Taylor expanded in y around inf
Applied rewrites100.0%
Final simplification67.6%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(if (<= y 1.12e-114)
(/ (/ y (+ x 1.0)) (+ x y))
(if (<= y 2.9e+146)
(/ (* 1.0 x) (* (+ (+ x y) 1.0) (+ x y)))
(/ (/ x y) (+ x y)))))assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.12e-114) {
tmp = (y / (x + 1.0)) / (x + y);
} else if (y <= 2.9e+146) {
tmp = (1.0 * x) / (((x + y) + 1.0) * (x + y));
} else {
tmp = (x / y) / (x + y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.12d-114) then
tmp = (y / (x + 1.0d0)) / (x + y)
else if (y <= 2.9d+146) then
tmp = (1.0d0 * x) / (((x + y) + 1.0d0) * (x + y))
else
tmp = (x / y) / (x + y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.12e-114) {
tmp = (y / (x + 1.0)) / (x + y);
} else if (y <= 2.9e+146) {
tmp = (1.0 * x) / (((x + y) + 1.0) * (x + y));
} else {
tmp = (x / y) / (x + y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.12e-114: tmp = (y / (x + 1.0)) / (x + y) elif y <= 2.9e+146: tmp = (1.0 * x) / (((x + y) + 1.0) * (x + y)) else: tmp = (x / y) / (x + y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.12e-114) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(x + y)); elseif (y <= 2.9e+146) tmp = Float64(Float64(1.0 * x) / Float64(Float64(Float64(x + y) + 1.0) * Float64(x + y))); else tmp = Float64(Float64(x / y) / Float64(x + y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.12e-114)
tmp = (y / (x + 1.0)) / (x + y);
elseif (y <= 2.9e+146)
tmp = (1.0 * x) / (((x + y) + 1.0) * (x + y));
else
tmp = (x / y) / (x + y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 1.12e-114], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+146], N[(N[(1.0 * x), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.12 \cdot 10^{-114}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{x + y}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+146}:\\
\;\;\;\;\frac{1 \cdot x}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\end{array}
\end{array}
if y < 1.11999999999999995e-114Initial program 73.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
lower-/.f64N/A
+-commutativeN/A
lower-+.f6457.1
Applied rewrites57.1%
if 1.11999999999999995e-114 < y < 2.8999999999999998e146Initial program 74.5%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6495.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.4
Applied rewrites95.4%
Taylor expanded in y around inf
Applied rewrites79.1%
if 2.8999999999999998e146 < y Initial program 75.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites100.0%
Taylor expanded in y around inf
lower-/.f64100.0
Applied rewrites100.0%
Final simplification67.6%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 7.6e-63) (/ y (fma x x x)) (if (<= y 2.9e+146) (/ x (* (+ 1.0 y) (+ x y))) (/ (/ x y) (+ x y)))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 7.6e-63) {
tmp = y / fma(x, x, x);
} else if (y <= 2.9e+146) {
tmp = x / ((1.0 + y) * (x + y));
} else {
tmp = (x / y) / (x + y);
}
return tmp;
}
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 7.6e-63) tmp = Float64(y / fma(x, x, x)); elseif (y <= 2.9e+146) tmp = Float64(x / Float64(Float64(1.0 + y) * Float64(x + y))); else tmp = Float64(Float64(x / y) / Float64(x + y)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 7.6e-63], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+146], N[(x / N[(N[(1.0 + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.6 \cdot 10^{-63}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+146}:\\
\;\;\;\;\frac{x}{\left(1 + y\right) \cdot \left(x + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\end{array}
\end{array}
if y < 7.60000000000000034e-63Initial program 74.7%
Taylor expanded in y around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6457.3
Applied rewrites57.3%
if 7.60000000000000034e-63 < y < 2.8999999999999998e146Initial program 69.8%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6469.8
lift-+.f64N/A
+-commutativeN/A
lower-+.f6469.8
Applied rewrites69.8%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
+-commutativeN/A
lift-+.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
lift-+.f64N/A
associate-/l/N/A
Applied rewrites99.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f6454.9
Applied rewrites54.9%
lift-/.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
lift-+.f64N/A
lower-*.f6464.7
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
Applied rewrites64.7%
if 2.8999999999999998e146 < y Initial program 75.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites100.0%
Taylor expanded in y around inf
lower-/.f64100.0
Applied rewrites100.0%
Final simplification63.9%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (* y y))))
(if (<= x -5.5e+17)
(/ y (* x x))
(if (<= x -5.8e-136) t_0 (if (<= x 1.62e-183) (/ x y) t_0)))))assert(x < y);
double code(double x, double y) {
double t_0 = x / (y * y);
double tmp;
if (x <= -5.5e+17) {
tmp = y / (x * x);
} else if (x <= -5.8e-136) {
tmp = t_0;
} else if (x <= 1.62e-183) {
tmp = x / y;
} else {
tmp = t_0;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = x / (y * y)
if (x <= (-5.5d+17)) then
tmp = y / (x * x)
else if (x <= (-5.8d-136)) then
tmp = t_0
else if (x <= 1.62d-183) then
tmp = x / y
else
tmp = t_0
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = x / (y * y);
double tmp;
if (x <= -5.5e+17) {
tmp = y / (x * x);
} else if (x <= -5.8e-136) {
tmp = t_0;
} else if (x <= 1.62e-183) {
tmp = x / y;
} else {
tmp = t_0;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = x / (y * y) tmp = 0 if x <= -5.5e+17: tmp = y / (x * x) elif x <= -5.8e-136: tmp = t_0 elif x <= 1.62e-183: tmp = x / y else: tmp = t_0 return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(x / Float64(y * y)) tmp = 0.0 if (x <= -5.5e+17) tmp = Float64(y / Float64(x * x)); elseif (x <= -5.8e-136) tmp = t_0; elseif (x <= 1.62e-183) tmp = Float64(x / y); else tmp = t_0; end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = x / (y * y);
tmp = 0.0;
if (x <= -5.5e+17)
tmp = y / (x * x);
elseif (x <= -5.8e-136)
tmp = t_0;
elseif (x <= 1.62e-183)
tmp = x / y;
else
tmp = t_0;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.5e+17], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.8e-136], t$95$0, If[LessEqual[x, 1.62e-183], N[(x / y), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{+17}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-136}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.62 \cdot 10^{-183}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -5.5e17Initial program 65.5%
Taylor expanded in x around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6477.9
Applied rewrites77.9%
if -5.5e17 < x < -5.79999999999999989e-136 or 1.62e-183 < x Initial program 77.0%
Taylor expanded in y around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6440.5
Applied rewrites40.5%
if -5.79999999999999989e-136 < x < 1.62e-183Initial program 74.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6474.0
lift-+.f64N/A
+-commutativeN/A
lower-+.f6474.0
Applied rewrites74.0%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
+-commutativeN/A
lift-+.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
lift-+.f64N/A
associate-/l/N/A
Applied rewrites99.8%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6490.9
Applied rewrites90.9%
Taylor expanded in y around 0
Applied rewrites80.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -8.2e-45) (/ (/ y (+ x 1.0)) (+ x y)) (/ (/ x y) (+ 1.0 y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -8.2e-45) {
tmp = (y / (x + 1.0)) / (x + y);
} else {
tmp = (x / y) / (1.0 + y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-8.2d-45)) then
tmp = (y / (x + 1.0d0)) / (x + y)
else
tmp = (x / y) / (1.0d0 + y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -8.2e-45) {
tmp = (y / (x + 1.0)) / (x + y);
} else {
tmp = (x / y) / (1.0 + y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -8.2e-45: tmp = (y / (x + 1.0)) / (x + y) else: tmp = (x / y) / (1.0 + y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -8.2e-45) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(x + y)); else tmp = Float64(Float64(x / y) / Float64(1.0 + y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -8.2e-45)
tmp = (y / (x + 1.0)) / (x + y);
else
tmp = (x / y) / (1.0 + y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -8.2e-45], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{1 + y}\\
\end{array}
\end{array}
if x < -8.1999999999999998e-45Initial program 67.8%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
lower-/.f64N/A
+-commutativeN/A
lower-+.f6478.7
Applied rewrites78.7%
if -8.1999999999999998e-45 < x Initial program 75.9%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6475.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6475.9
Applied rewrites75.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
+-commutativeN/A
lift-+.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
lift-+.f64N/A
associate-/l/N/A
Applied rewrites99.5%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f6463.0
Applied rewrites63.0%
Taylor expanded in y around inf
lower-/.f6462.6
Applied rewrites62.6%
Final simplification66.6%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -1.8e+18) (/ (/ y x) (+ x y)) (/ (/ x y) (+ 1.0 y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -1.8e+18) {
tmp = (y / x) / (x + y);
} else {
tmp = (x / y) / (1.0 + y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.8d+18)) then
tmp = (y / x) / (x + y)
else
tmp = (x / y) / (1.0d0 + y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -1.8e+18) {
tmp = (y / x) / (x + y);
} else {
tmp = (x / y) / (1.0 + y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -1.8e+18: tmp = (y / x) / (x + y) else: tmp = (x / y) / (1.0 + y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -1.8e+18) tmp = Float64(Float64(y / x) / Float64(x + y)); else tmp = Float64(Float64(x / y) / Float64(1.0 + y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -1.8e+18)
tmp = (y / x) / (x + y);
else
tmp = (x / y) / (1.0 + y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -1.8e+18], N[(N[(y / x), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+18}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{1 + y}\\
\end{array}
\end{array}
if x < -1.8e18Initial program 65.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in x around inf
lower-/.f6483.7
Applied rewrites83.7%
if -1.8e18 < x Initial program 76.1%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6476.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6476.1
Applied rewrites76.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
+-commutativeN/A
lift-+.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
lift-+.f64N/A
associate-/l/N/A
Applied rewrites99.5%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f6462.4
Applied rewrites62.4%
Taylor expanded in y around inf
lower-/.f6462.1
Applied rewrites62.1%
Final simplification66.6%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 7.6e-63) (/ y (fma x x x)) (/ x (* (+ 1.0 y) (+ x y)))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 7.6e-63) {
tmp = y / fma(x, x, x);
} else {
tmp = x / ((1.0 + y) * (x + y));
}
return tmp;
}
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 7.6e-63) tmp = Float64(y / fma(x, x, x)); else tmp = Float64(x / Float64(Float64(1.0 + y) * Float64(x + y))); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 7.6e-63], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.6 \cdot 10^{-63}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(1 + y\right) \cdot \left(x + y\right)}\\
\end{array}
\end{array}
if y < 7.60000000000000034e-63Initial program 74.7%
Taylor expanded in y around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6457.3
Applied rewrites57.3%
if 7.60000000000000034e-63 < y Initial program 72.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6472.0
lift-+.f64N/A
+-commutativeN/A
lower-+.f6472.0
Applied rewrites72.0%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
+-commutativeN/A
lift-+.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
lift-+.f64N/A
associate-/l/N/A
Applied rewrites99.4%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f6472.4
Applied rewrites72.4%
lift-/.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
+-commutativeN/A
lift-+.f64N/A
lower-*.f6472.8
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
Applied rewrites72.8%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -5.5e+17) (/ (/ y x) x) (/ x (fma y y y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -5.5e+17) {
tmp = (y / x) / x;
} else {
tmp = x / fma(y, y, y);
}
return tmp;
}
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -5.5e+17) tmp = Float64(Float64(y / x) / x); else tmp = Float64(x / fma(y, y, y)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -5.5e+17], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], N[(x / N[(y * y + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+17}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\
\end{array}
\end{array}
if x < -5.5e17Initial program 65.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in x around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6477.9
Applied rewrites77.9%
Applied rewrites83.4%
if -5.5e17 < x Initial program 76.1%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6460.7
Applied rewrites60.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -8.2e-45) (/ y (fma x x x)) (/ x (fma y y y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -8.2e-45) {
tmp = y / fma(x, x, x);
} else {
tmp = x / fma(y, y, y);
}
return tmp;
}
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -8.2e-45) tmp = Float64(y / fma(x, x, x)); else tmp = Float64(x / fma(y, y, y)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -8.2e-45], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\
\end{array}
\end{array}
if x < -8.1999999999999998e-45Initial program 67.8%
Taylor expanded in y around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6473.7
Applied rewrites73.7%
if -8.1999999999999998e-45 < x Initial program 75.9%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6461.2
Applied rewrites61.2%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -5.5e+17) (/ y (* x x)) (/ x (fma y y y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -5.5e+17) {
tmp = y / (x * x);
} else {
tmp = x / fma(y, y, y);
}
return tmp;
}
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -5.5e+17) tmp = Float64(y / Float64(x * x)); else tmp = Float64(x / fma(y, y, y)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -5.5e+17], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+17}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\
\end{array}
\end{array}
if x < -5.5e17Initial program 65.5%
Taylor expanded in x around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6477.9
Applied rewrites77.9%
if -5.5e17 < x Initial program 76.1%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6460.7
Applied rewrites60.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 1.0) (/ x y) (/ x (* y y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.0) {
tmp = x / y;
} else {
tmp = x / (y * y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.0d0) then
tmp = x / y
else
tmp = x / (y * y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.0) {
tmp = x / y;
} else {
tmp = x / (y * y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.0: tmp = x / y else: tmp = x / (y * y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.0) tmp = Float64(x / y); else tmp = Float64(x / Float64(y * y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.0)
tmp = x / y;
else
tmp = x / (y * y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 1.0], N[(x / y), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < 1Initial program 76.5%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6476.5
lift-+.f64N/A
+-commutativeN/A
lower-+.f6476.5
Applied rewrites76.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
+-commutativeN/A
lift-+.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
lift-+.f64N/A
associate-/l/N/A
Applied rewrites99.3%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6444.0
Applied rewrites44.0%
Taylor expanded in y around 0
Applied rewrites28.8%
if 1 < y Initial program 66.1%
Taylor expanded in y around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6470.5
Applied rewrites70.5%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (/ x y))
assert(x < y);
double code(double x, double y) {
return x / y;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / y
end function
assert x < y;
public static double code(double x, double y) {
return x / y;
}
[x, y] = sort([x, y]) def code(x, y): return x / y
x, y = sort([x, y]) function code(x, y) return Float64(x / y) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = x / y;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{x}{y}
\end{array}
Initial program 73.9%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6473.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6473.9
Applied rewrites73.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
+-commutativeN/A
lift-+.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
lift-+.f64N/A
associate-/l/N/A
Applied rewrites99.4%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6450.7
Applied rewrites50.7%
Taylor expanded in y around 0
Applied rewrites28.7%
(FPCore (x y) :precision binary64 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y): return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y) return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x)))) end
function tmp = code(x, y) tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x))); end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}
herbie shell --seed 2024249
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x)))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))