
(FPCore (x y) :precision binary64 (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))
double code(double x, double y) {
return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - (((1.0d0 - x) * y) / (y + 1.0d0))
end function
public static double code(double x, double y) {
return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
def code(x, y): return 1.0 - (((1.0 - x) * y) / (y + 1.0))
function code(x, y) return Float64(1.0 - Float64(Float64(Float64(1.0 - x) * y) / Float64(y + 1.0))) end
function tmp = code(x, y) tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0)); end
code[x_, y_] := N[(1.0 - N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{\left(1 - x\right) \cdot y}{y + 1}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))
double code(double x, double y) {
return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - (((1.0d0 - x) * y) / (y + 1.0d0))
end function
public static double code(double x, double y) {
return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
def code(x, y): return 1.0 - (((1.0 - x) * y) / (y + 1.0))
function code(x, y) return Float64(1.0 - Float64(Float64(Float64(1.0 - x) * y) / Float64(y + 1.0))) end
function tmp = code(x, y) tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0)); end
code[x_, y_] := N[(1.0 - N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{\left(1 - x\right) \cdot y}{y + 1}
\end{array}
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (+ x -1.0) (pow y 2.0))))
(if (<= y -320000.0)
(+ x (+ t_0 (/ (- 1.0 x) y)))
(if (<= y 11500.0)
(fma y (/ (+ x -1.0) (+ y 1.0)) 1.0)
(+ (- x (/ (+ x -1.0) y)) (+ t_0 (/ (- 1.0 x) (pow y 3.0))))))))
double code(double x, double y) {
double t_0 = (x + -1.0) / pow(y, 2.0);
double tmp;
if (y <= -320000.0) {
tmp = x + (t_0 + ((1.0 - x) / y));
} else if (y <= 11500.0) {
tmp = fma(y, ((x + -1.0) / (y + 1.0)), 1.0);
} else {
tmp = (x - ((x + -1.0) / y)) + (t_0 + ((1.0 - x) / pow(y, 3.0)));
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(x + -1.0) / (y ^ 2.0)) tmp = 0.0 if (y <= -320000.0) tmp = Float64(x + Float64(t_0 + Float64(Float64(1.0 - x) / y))); elseif (y <= 11500.0) tmp = fma(y, Float64(Float64(x + -1.0) / Float64(y + 1.0)), 1.0); else tmp = Float64(Float64(x - Float64(Float64(x + -1.0) / y)) + Float64(t_0 + Float64(Float64(1.0 - x) / (y ^ 3.0)))); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(x + -1.0), $MachinePrecision] / N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -320000.0], N[(x + N[(t$95$0 + N[(N[(1.0 - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 11500.0], N[(y * N[(N[(x + -1.0), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(N[(x - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 + N[(N[(1.0 - x), $MachinePrecision] / N[Power[y, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -1}{{y}^{2}}\\
\mathbf{if}\;y \leq -320000:\\
\;\;\;\;x + \left(t\_0 + \frac{1 - x}{y}\right)\\
\mathbf{elif}\;y \leq 11500:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x + -1}{y + 1}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{x + -1}{y}\right) + \left(t\_0 + \frac{1 - x}{{y}^{3}}\right)\\
\end{array}
\end{array}
if y < -3.2e5Initial program 36.3%
associate-/l*57.4%
remove-double-neg57.4%
remove-double-neg57.4%
+-commutative57.4%
Simplified57.4%
Taylor expanded in y around inf 100.0%
associate--l+100.0%
neg-mul-1100.0%
sub-neg100.0%
associate--l+100.0%
div-sub100.0%
sub-neg100.0%
+-commutative100.0%
neg-mul-1100.0%
metadata-eval100.0%
distribute-lft-in100.0%
metadata-eval100.0%
sub-neg100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
if -3.2e5 < y < 11500Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
*-commutative99.9%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
fma-define99.9%
distribute-frac-neg299.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
if 11500 < y Initial program 40.7%
associate-/l*53.3%
remove-double-neg53.3%
remove-double-neg53.3%
+-commutative53.3%
Simplified53.3%
Taylor expanded in y around -inf 99.9%
associate-+r+99.9%
associate--l+99.9%
mul-1-neg99.9%
unsub-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* y (- 1.0 x)) (+ y 1.0))))
(if (or (<= t_0 5e-14) (not (<= t_0 1.001)))
(+ 1.0 (* (+ x -1.0) (/ y (+ y 1.0))))
(+ x (+ (/ 1.0 y) (/ -1.0 (pow y 2.0)))))))
double code(double x, double y) {
double t_0 = (y * (1.0 - x)) / (y + 1.0);
double tmp;
if ((t_0 <= 5e-14) || !(t_0 <= 1.001)) {
tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0)));
} else {
tmp = x + ((1.0 / y) + (-1.0 / pow(y, 2.0)));
}
return tmp;
}
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 = (y * (1.0d0 - x)) / (y + 1.0d0)
if ((t_0 <= 5d-14) .or. (.not. (t_0 <= 1.001d0))) then
tmp = 1.0d0 + ((x + (-1.0d0)) * (y / (y + 1.0d0)))
else
tmp = x + ((1.0d0 / y) + ((-1.0d0) / (y ** 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y * (1.0 - x)) / (y + 1.0);
double tmp;
if ((t_0 <= 5e-14) || !(t_0 <= 1.001)) {
tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0)));
} else {
tmp = x + ((1.0 / y) + (-1.0 / Math.pow(y, 2.0)));
}
return tmp;
}
def code(x, y): t_0 = (y * (1.0 - x)) / (y + 1.0) tmp = 0 if (t_0 <= 5e-14) or not (t_0 <= 1.001): tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0))) else: tmp = x + ((1.0 / y) + (-1.0 / math.pow(y, 2.0))) return tmp
function code(x, y) t_0 = Float64(Float64(y * Float64(1.0 - x)) / Float64(y + 1.0)) tmp = 0.0 if ((t_0 <= 5e-14) || !(t_0 <= 1.001)) tmp = Float64(1.0 + Float64(Float64(x + -1.0) * Float64(y / Float64(y + 1.0)))); else tmp = Float64(x + Float64(Float64(1.0 / y) + Float64(-1.0 / (y ^ 2.0)))); end return tmp end
function tmp_2 = code(x, y) t_0 = (y * (1.0 - x)) / (y + 1.0); tmp = 0.0; if ((t_0 <= 5e-14) || ~((t_0 <= 1.001))) tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0))); else tmp = x + ((1.0 / y) + (-1.0 / (y ^ 2.0))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y * N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 5e-14], N[Not[LessEqual[t$95$0, 1.001]], $MachinePrecision]], N[(1.0 + N[(N[(x + -1.0), $MachinePrecision] * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(1.0 / y), $MachinePrecision] + N[(-1.0 / N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y \cdot \left(1 - x\right)}{y + 1}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{-14} \lor \neg \left(t\_0 \leq 1.001\right):\\
\;\;\;\;1 + \left(x + -1\right) \cdot \frac{y}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{1}{y} + \frac{-1}{{y}^{2}}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 1 x) y) (+.f64 y 1)) < 5.0000000000000002e-14 or 1.0009999999999999 < (/.f64 (*.f64 (-.f64 1 x) y) (+.f64 y 1)) Initial program 88.0%
associate-/l*99.9%
remove-double-neg99.9%
remove-double-neg99.9%
+-commutative99.9%
Simplified99.9%
if 5.0000000000000002e-14 < (/.f64 (*.f64 (-.f64 1 x) y) (+.f64 y 1)) < 1.0009999999999999Initial program 11.8%
associate-/l*11.8%
remove-double-neg11.8%
remove-double-neg11.8%
+-commutative11.8%
Simplified11.8%
Taylor expanded in y around inf 99.8%
associate--l+99.8%
neg-mul-199.8%
sub-neg99.8%
associate--l+99.8%
div-sub99.8%
sub-neg99.8%
+-commutative99.8%
neg-mul-199.8%
metadata-eval99.8%
distribute-lft-in99.8%
metadata-eval99.8%
sub-neg99.8%
associate-*r/99.8%
mul-1-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(if (<= y -250000.0)
(+ x (+ (/ (+ x -1.0) (pow y 2.0)) (/ (- 1.0 x) y)))
(if (<= y 7500000.0)
(+ 1.0 (* (+ x -1.0) (/ y (+ y 1.0))))
(+ x (+ (/ 1.0 y) (/ -1.0 (pow y 2.0)))))))
double code(double x, double y) {
double tmp;
if (y <= -250000.0) {
tmp = x + (((x + -1.0) / pow(y, 2.0)) + ((1.0 - x) / y));
} else if (y <= 7500000.0) {
tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0)));
} else {
tmp = x + ((1.0 / y) + (-1.0 / pow(y, 2.0)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-250000.0d0)) then
tmp = x + (((x + (-1.0d0)) / (y ** 2.0d0)) + ((1.0d0 - x) / y))
else if (y <= 7500000.0d0) then
tmp = 1.0d0 + ((x + (-1.0d0)) * (y / (y + 1.0d0)))
else
tmp = x + ((1.0d0 / y) + ((-1.0d0) / (y ** 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -250000.0) {
tmp = x + (((x + -1.0) / Math.pow(y, 2.0)) + ((1.0 - x) / y));
} else if (y <= 7500000.0) {
tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0)));
} else {
tmp = x + ((1.0 / y) + (-1.0 / Math.pow(y, 2.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -250000.0: tmp = x + (((x + -1.0) / math.pow(y, 2.0)) + ((1.0 - x) / y)) elif y <= 7500000.0: tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0))) else: tmp = x + ((1.0 / y) + (-1.0 / math.pow(y, 2.0))) return tmp
function code(x, y) tmp = 0.0 if (y <= -250000.0) tmp = Float64(x + Float64(Float64(Float64(x + -1.0) / (y ^ 2.0)) + Float64(Float64(1.0 - x) / y))); elseif (y <= 7500000.0) tmp = Float64(1.0 + Float64(Float64(x + -1.0) * Float64(y / Float64(y + 1.0)))); else tmp = Float64(x + Float64(Float64(1.0 / y) + Float64(-1.0 / (y ^ 2.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -250000.0) tmp = x + (((x + -1.0) / (y ^ 2.0)) + ((1.0 - x) / y)); elseif (y <= 7500000.0) tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0))); else tmp = x + ((1.0 / y) + (-1.0 / (y ^ 2.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -250000.0], N[(x + N[(N[(N[(x + -1.0), $MachinePrecision] / N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7500000.0], N[(1.0 + N[(N[(x + -1.0), $MachinePrecision] * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(1.0 / y), $MachinePrecision] + N[(-1.0 / N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -250000:\\
\;\;\;\;x + \left(\frac{x + -1}{{y}^{2}} + \frac{1 - x}{y}\right)\\
\mathbf{elif}\;y \leq 7500000:\\
\;\;\;\;1 + \left(x + -1\right) \cdot \frac{y}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{1}{y} + \frac{-1}{{y}^{2}}\right)\\
\end{array}
\end{array}
if y < -2.5e5Initial program 36.3%
associate-/l*57.4%
remove-double-neg57.4%
remove-double-neg57.4%
+-commutative57.4%
Simplified57.4%
Taylor expanded in y around inf 100.0%
associate--l+100.0%
neg-mul-1100.0%
sub-neg100.0%
associate--l+100.0%
div-sub100.0%
sub-neg100.0%
+-commutative100.0%
neg-mul-1100.0%
metadata-eval100.0%
distribute-lft-in100.0%
metadata-eval100.0%
sub-neg100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
if -2.5e5 < y < 7.5e6Initial program 99.9%
associate-/l*99.9%
remove-double-neg99.9%
remove-double-neg99.9%
+-commutative99.9%
Simplified99.9%
if 7.5e6 < y Initial program 39.7%
associate-/l*52.6%
remove-double-neg52.6%
remove-double-neg52.6%
+-commutative52.6%
Simplified52.6%
Taylor expanded in y around inf 99.8%
associate--l+99.8%
neg-mul-199.8%
sub-neg99.8%
associate--l+99.8%
div-sub99.8%
sub-neg99.8%
+-commutative99.8%
neg-mul-199.8%
metadata-eval99.8%
distribute-lft-in99.8%
metadata-eval99.8%
sub-neg99.8%
associate-*r/99.8%
mul-1-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(if (<= y -1.1e+28)
x
(if (<= y -3.6e+21)
(/ 1.0 y)
(if (<= y -1.0) x (if (<= y 0.88) (- 1.0 y) x)))))
double code(double x, double y) {
double tmp;
if (y <= -1.1e+28) {
tmp = x;
} else if (y <= -3.6e+21) {
tmp = 1.0 / y;
} else if (y <= -1.0) {
tmp = x;
} else if (y <= 0.88) {
tmp = 1.0 - y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.1d+28)) then
tmp = x
else if (y <= (-3.6d+21)) then
tmp = 1.0d0 / y
else if (y <= (-1.0d0)) then
tmp = x
else if (y <= 0.88d0) then
tmp = 1.0d0 - y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.1e+28) {
tmp = x;
} else if (y <= -3.6e+21) {
tmp = 1.0 / y;
} else if (y <= -1.0) {
tmp = x;
} else if (y <= 0.88) {
tmp = 1.0 - y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.1e+28: tmp = x elif y <= -3.6e+21: tmp = 1.0 / y elif y <= -1.0: tmp = x elif y <= 0.88: tmp = 1.0 - y else: tmp = x return tmp
function code(x, y) tmp = 0.0 if (y <= -1.1e+28) tmp = x; elseif (y <= -3.6e+21) tmp = Float64(1.0 / y); elseif (y <= -1.0) tmp = x; elseif (y <= 0.88) tmp = Float64(1.0 - y); else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.1e+28) tmp = x; elseif (y <= -3.6e+21) tmp = 1.0 / y; elseif (y <= -1.0) tmp = x; elseif (y <= 0.88) tmp = 1.0 - y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.1e+28], x, If[LessEqual[y, -3.6e+21], N[(1.0 / y), $MachinePrecision], If[LessEqual[y, -1.0], x, If[LessEqual[y, 0.88], N[(1.0 - y), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{+21}:\\
\;\;\;\;\frac{1}{y}\\
\mathbf{elif}\;y \leq -1:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.88:\\
\;\;\;\;1 - y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.09999999999999993e28 or -3.6e21 < y < -1 or 0.880000000000000004 < y Initial program 40.5%
associate-/l*58.1%
remove-double-neg58.1%
remove-double-neg58.1%
+-commutative58.1%
Simplified58.1%
Taylor expanded in y around inf 76.3%
if -1.09999999999999993e28 < y < -3.6e21Initial program 3.3%
associate-/l*3.3%
remove-double-neg3.3%
remove-double-neg3.3%
+-commutative3.3%
Simplified3.3%
Taylor expanded in y around inf 100.0%
associate--l+100.0%
div-sub100.0%
sub-neg100.0%
+-commutative100.0%
neg-mul-1100.0%
metadata-eval100.0%
distribute-lft-in100.0%
metadata-eval100.0%
sub-neg100.0%
associate-*r/100.0%
mul-1-neg100.0%
unsub-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
if -1 < y < 0.880000000000000004Initial program 100.0%
associate-/l*100.0%
remove-double-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 76.7%
Taylor expanded in y around 0 75.6%
neg-mul-175.6%
unsub-neg75.6%
Simplified75.6%
Final simplification76.4%
(FPCore (x y)
:precision binary64
(if (<= y -120000000.0)
(- x (/ (+ x -1.0) y))
(if (<= y 13000000000.0)
(+ 1.0 (* (+ x -1.0) (/ y (+ y 1.0))))
(+ x (/ 1.0 y)))))
double code(double x, double y) {
double tmp;
if (y <= -120000000.0) {
tmp = x - ((x + -1.0) / y);
} else if (y <= 13000000000.0) {
tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0)));
} else {
tmp = x + (1.0 / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-120000000.0d0)) then
tmp = x - ((x + (-1.0d0)) / y)
else if (y <= 13000000000.0d0) then
tmp = 1.0d0 + ((x + (-1.0d0)) * (y / (y + 1.0d0)))
else
tmp = x + (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -120000000.0) {
tmp = x - ((x + -1.0) / y);
} else if (y <= 13000000000.0) {
tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0)));
} else {
tmp = x + (1.0 / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -120000000.0: tmp = x - ((x + -1.0) / y) elif y <= 13000000000.0: tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0))) else: tmp = x + (1.0 / y) return tmp
function code(x, y) tmp = 0.0 if (y <= -120000000.0) tmp = Float64(x - Float64(Float64(x + -1.0) / y)); elseif (y <= 13000000000.0) tmp = Float64(1.0 + Float64(Float64(x + -1.0) * Float64(y / Float64(y + 1.0)))); else tmp = Float64(x + Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -120000000.0) tmp = x - ((x + -1.0) / y); elseif (y <= 13000000000.0) tmp = 1.0 + ((x + -1.0) * (y / (y + 1.0))); else tmp = x + (1.0 / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -120000000.0], N[(x - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 13000000000.0], N[(1.0 + N[(N[(x + -1.0), $MachinePrecision] * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -120000000:\\
\;\;\;\;x - \frac{x + -1}{y}\\
\mathbf{elif}\;y \leq 13000000000:\\
\;\;\;\;1 + \left(x + -1\right) \cdot \frac{y}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{y}\\
\end{array}
\end{array}
if y < -1.2e8Initial program 36.3%
associate-/l*57.4%
remove-double-neg57.4%
remove-double-neg57.4%
+-commutative57.4%
Simplified57.4%
Taylor expanded in y around inf 99.5%
associate--l+99.5%
div-sub99.5%
sub-neg99.5%
+-commutative99.5%
neg-mul-199.5%
metadata-eval99.5%
distribute-lft-in99.5%
metadata-eval99.5%
sub-neg99.5%
associate-*r/99.5%
mul-1-neg99.5%
unsub-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
if -1.2e8 < y < 1.3e10Initial program 99.6%
associate-/l*99.6%
remove-double-neg99.6%
remove-double-neg99.6%
+-commutative99.6%
Simplified99.6%
if 1.3e10 < y Initial program 39.2%
associate-/l*52.3%
remove-double-neg52.3%
remove-double-neg52.3%
+-commutative52.3%
Simplified52.3%
Taylor expanded in y around inf 99.9%
associate--l+99.9%
div-sub99.9%
sub-neg99.9%
+-commutative99.9%
neg-mul-199.9%
metadata-eval99.9%
distribute-lft-in99.9%
metadata-eval99.9%
sub-neg99.9%
associate-*r/99.9%
mul-1-neg99.9%
unsub-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 99.9%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (or (<= y -1.0) (not (<= y 0.8))) (+ x (/ 1.0 y)) (- 1.0 (* y (- 1.0 x)))))
double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 0.8)) {
tmp = x + (1.0 / y);
} else {
tmp = 1.0 - (y * (1.0 - x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.0d0)) .or. (.not. (y <= 0.8d0))) then
tmp = x + (1.0d0 / y)
else
tmp = 1.0d0 - (y * (1.0d0 - x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 0.8)) {
tmp = x + (1.0 / y);
} else {
tmp = 1.0 - (y * (1.0 - x));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.0) or not (y <= 0.8): tmp = x + (1.0 / y) else: tmp = 1.0 - (y * (1.0 - x)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.0) || !(y <= 0.8)) tmp = Float64(x + Float64(1.0 / y)); else tmp = Float64(1.0 - Float64(y * Float64(1.0 - x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.0) || ~((y <= 0.8))) tmp = x + (1.0 / y); else tmp = 1.0 - (y * (1.0 - x)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 0.8]], $MachinePrecision]], N[(x + N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y * N[(1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 0.8\right):\\
\;\;\;\;x + \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 - y \cdot \left(1 - x\right)\\
\end{array}
\end{array}
if y < -1 or 0.80000000000000004 < y Initial program 39.1%
associate-/l*56.1%
remove-double-neg56.1%
remove-double-neg56.1%
+-commutative56.1%
Simplified56.1%
Taylor expanded in y around inf 98.3%
associate--l+98.3%
div-sub98.3%
sub-neg98.3%
+-commutative98.3%
neg-mul-198.3%
metadata-eval98.3%
distribute-lft-in98.3%
metadata-eval98.3%
sub-neg98.3%
associate-*r/98.3%
mul-1-neg98.3%
unsub-neg98.3%
sub-neg98.3%
metadata-eval98.3%
Simplified98.3%
Taylor expanded in x around 0 97.9%
if -1 < y < 0.80000000000000004Initial program 100.0%
associate-/l*100.0%
remove-double-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 98.9%
Final simplification98.4%
(FPCore (x y) :precision binary64 (if (or (<= y -1.0) (not (<= y 1.0))) (- x (/ (+ x -1.0) y)) (- 1.0 (* y (- 1.0 x)))))
double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 - (y * (1.0 - x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.0d0)) .or. (.not. (y <= 1.0d0))) then
tmp = x - ((x + (-1.0d0)) / y)
else
tmp = 1.0d0 - (y * (1.0d0 - x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 - (y * (1.0 - x));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.0) or not (y <= 1.0): tmp = x - ((x + -1.0) / y) else: tmp = 1.0 - (y * (1.0 - x)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.0) || !(y <= 1.0)) tmp = Float64(x - Float64(Float64(x + -1.0) / y)); else tmp = Float64(1.0 - Float64(y * Float64(1.0 - x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.0) || ~((y <= 1.0))) tmp = x - ((x + -1.0) / y); else tmp = 1.0 - (y * (1.0 - x)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 1.0]], $MachinePrecision]], N[(x - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y * N[(1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 1\right):\\
\;\;\;\;x - \frac{x + -1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 - y \cdot \left(1 - x\right)\\
\end{array}
\end{array}
if y < -1 or 1 < y Initial program 39.1%
associate-/l*56.1%
remove-double-neg56.1%
remove-double-neg56.1%
+-commutative56.1%
Simplified56.1%
Taylor expanded in y around inf 98.3%
associate--l+98.3%
div-sub98.3%
sub-neg98.3%
+-commutative98.3%
neg-mul-198.3%
metadata-eval98.3%
distribute-lft-in98.3%
metadata-eval98.3%
sub-neg98.3%
associate-*r/98.3%
mul-1-neg98.3%
unsub-neg98.3%
sub-neg98.3%
metadata-eval98.3%
Simplified98.3%
if -1 < y < 1Initial program 100.0%
associate-/l*100.0%
remove-double-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 98.9%
Final simplification98.6%
(FPCore (x y) :precision binary64 (if (or (<= y -1.0) (not (<= y 0.102))) (+ x (/ 1.0 y)) (- 1.0 y)))
double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 0.102)) {
tmp = x + (1.0 / y);
} else {
tmp = 1.0 - y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.0d0)) .or. (.not. (y <= 0.102d0))) then
tmp = x + (1.0d0 / y)
else
tmp = 1.0d0 - y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 0.102)) {
tmp = x + (1.0 / y);
} else {
tmp = 1.0 - y;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.0) or not (y <= 0.102): tmp = x + (1.0 / y) else: tmp = 1.0 - y return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.0) || !(y <= 0.102)) tmp = Float64(x + Float64(1.0 / y)); else tmp = Float64(1.0 - y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.0) || ~((y <= 0.102))) tmp = x + (1.0 / y); else tmp = 1.0 - y; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 0.102]], $MachinePrecision]], N[(x + N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(1.0 - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 0.102\right):\\
\;\;\;\;x + \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 - y\\
\end{array}
\end{array}
if y < -1 or 0.101999999999999993 < y Initial program 39.1%
associate-/l*56.1%
remove-double-neg56.1%
remove-double-neg56.1%
+-commutative56.1%
Simplified56.1%
Taylor expanded in y around inf 98.3%
associate--l+98.3%
div-sub98.3%
sub-neg98.3%
+-commutative98.3%
neg-mul-198.3%
metadata-eval98.3%
distribute-lft-in98.3%
metadata-eval98.3%
sub-neg98.3%
associate-*r/98.3%
mul-1-neg98.3%
unsub-neg98.3%
sub-neg98.3%
metadata-eval98.3%
Simplified98.3%
Taylor expanded in x around 0 97.9%
if -1 < y < 0.101999999999999993Initial program 100.0%
associate-/l*100.0%
remove-double-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 76.7%
Taylor expanded in y around 0 75.6%
neg-mul-175.6%
unsub-neg75.6%
Simplified75.6%
Final simplification87.2%
(FPCore (x y) :precision binary64 (if (or (<= y -1.0) (not (<= y 1.0))) (+ x (/ 1.0 y)) (+ 1.0 (* y x))))
double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = x + (1.0 / y);
} else {
tmp = 1.0 + (y * x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.0d0)) .or. (.not. (y <= 1.0d0))) then
tmp = x + (1.0d0 / y)
else
tmp = 1.0d0 + (y * x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = x + (1.0 / y);
} else {
tmp = 1.0 + (y * x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.0) or not (y <= 1.0): tmp = x + (1.0 / y) else: tmp = 1.0 + (y * x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.0) || !(y <= 1.0)) tmp = Float64(x + Float64(1.0 / y)); else tmp = Float64(1.0 + Float64(y * x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.0) || ~((y <= 1.0))) tmp = x + (1.0 / y); else tmp = 1.0 + (y * x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 1.0]], $MachinePrecision]], N[(x + N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 1\right):\\
\;\;\;\;x + \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot x\\
\end{array}
\end{array}
if y < -1 or 1 < y Initial program 39.1%
associate-/l*56.1%
remove-double-neg56.1%
remove-double-neg56.1%
+-commutative56.1%
Simplified56.1%
Taylor expanded in y around inf 98.3%
associate--l+98.3%
div-sub98.3%
sub-neg98.3%
+-commutative98.3%
neg-mul-198.3%
metadata-eval98.3%
distribute-lft-in98.3%
metadata-eval98.3%
sub-neg98.3%
associate-*r/98.3%
mul-1-neg98.3%
unsub-neg98.3%
sub-neg98.3%
metadata-eval98.3%
Simplified98.3%
Taylor expanded in x around 0 97.9%
if -1 < y < 1Initial program 100.0%
associate-/l*100.0%
remove-double-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 98.9%
Taylor expanded in x around inf 97.9%
mul-1-neg97.9%
distribute-lft-neg-out97.9%
*-commutative97.9%
Simplified97.9%
Final simplification97.9%
(FPCore (x y) :precision binary64 (if (<= y -1.0) x (if (<= y 0.72) (- 1.0 y) x)))
double code(double x, double y) {
double tmp;
if (y <= -1.0) {
tmp = x;
} else if (y <= 0.72) {
tmp = 1.0 - y;
} else {
tmp = x;
}
return tmp;
}
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
else if (y <= 0.72d0) then
tmp = 1.0d0 - y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.0) {
tmp = x;
} else if (y <= 0.72) {
tmp = 1.0 - y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.0: tmp = x elif y <= 0.72: tmp = 1.0 - y else: tmp = x return tmp
function code(x, y) tmp = 0.0 if (y <= -1.0) tmp = x; elseif (y <= 0.72) tmp = Float64(1.0 - y); else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.0) tmp = x; elseif (y <= 0.72) tmp = 1.0 - y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.0], x, If[LessEqual[y, 0.72], N[(1.0 - y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.72:\\
\;\;\;\;1 - y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1 or 0.71999999999999997 < y Initial program 39.1%
associate-/l*56.1%
remove-double-neg56.1%
remove-double-neg56.1%
+-commutative56.1%
Simplified56.1%
Taylor expanded in y around inf 73.5%
if -1 < y < 0.71999999999999997Initial program 100.0%
associate-/l*100.0%
remove-double-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 76.7%
Taylor expanded in y around 0 75.6%
neg-mul-175.6%
unsub-neg75.6%
Simplified75.6%
Final simplification74.5%
(FPCore (x y) :precision binary64 (if (<= y -1.0) x (if (<= y 0.92) 1.0 x)))
double code(double x, double y) {
double tmp;
if (y <= -1.0) {
tmp = x;
} else if (y <= 0.92) {
tmp = 1.0;
} else {
tmp = x;
}
return tmp;
}
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
else if (y <= 0.92d0) then
tmp = 1.0d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.0) {
tmp = x;
} else if (y <= 0.92) {
tmp = 1.0;
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.0: tmp = x elif y <= 0.92: tmp = 1.0 else: tmp = x return tmp
function code(x, y) tmp = 0.0 if (y <= -1.0) tmp = x; elseif (y <= 0.92) tmp = 1.0; else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.0) tmp = x; elseif (y <= 0.92) tmp = 1.0; else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.0], x, If[LessEqual[y, 0.92], 1.0, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.92:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1 or 0.92000000000000004 < y Initial program 39.1%
associate-/l*56.1%
remove-double-neg56.1%
remove-double-neg56.1%
+-commutative56.1%
Simplified56.1%
Taylor expanded in y around inf 73.5%
if -1 < y < 0.92000000000000004Initial program 100.0%
associate-/l*100.0%
remove-double-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 74.6%
Final simplification74.1%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 68.4%
associate-/l*77.2%
remove-double-neg77.2%
remove-double-neg77.2%
+-commutative77.2%
Simplified77.2%
Taylor expanded in y around 0 37.9%
Final simplification37.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- (/ 1.0 y) (- (/ x y) x))))
(if (< y -3693.8482788297247)
t_0
(if (< y 6799310503.41891) (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))) t_0))))
double code(double x, double y) {
double t_0 = (1.0 / y) - ((x / y) - x);
double tmp;
if (y < -3693.8482788297247) {
tmp = t_0;
} else if (y < 6799310503.41891) {
tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
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 = (1.0d0 / y) - ((x / y) - x)
if (y < (-3693.8482788297247d0)) then
tmp = t_0
else if (y < 6799310503.41891d0) then
tmp = 1.0d0 - (((1.0d0 - x) * y) / (y + 1.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (1.0 / y) - ((x / y) - x);
double tmp;
if (y < -3693.8482788297247) {
tmp = t_0;
} else if (y < 6799310503.41891) {
tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (1.0 / y) - ((x / y) - x) tmp = 0 if y < -3693.8482788297247: tmp = t_0 elif y < 6799310503.41891: tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0)) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(1.0 / y) - Float64(Float64(x / y) - x)) tmp = 0.0 if (y < -3693.8482788297247) tmp = t_0; elseif (y < 6799310503.41891) tmp = Float64(1.0 - Float64(Float64(Float64(1.0 - x) * y) / Float64(y + 1.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (1.0 / y) - ((x / y) - x); tmp = 0.0; if (y < -3693.8482788297247) tmp = t_0; elseif (y < 6799310503.41891) tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(1.0 / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -3693.8482788297247], t$95$0, If[Less[y, 6799310503.41891], N[(1.0 - N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{y} - \left(\frac{x}{y} - x\right)\\
\mathbf{if}\;y < -3693.8482788297247:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y < 6799310503.41891:\\
\;\;\;\;1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024041
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:herbie-target
(if (< y -3693.8482788297247) (- (/ 1.0 y) (- (/ x y) x)) (if (< y 6799310503.41891) (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))) (- (/ 1.0 y) (- (/ x y) x))))
(- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))