
(FPCore (x y) :precision binary64 (+ (- (* x (- y 1.0)) (* y 0.5)) 0.918938533204673))
double code(double x, double y) {
return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * (y - 1.0d0)) - (y * 0.5d0)) + 0.918938533204673d0
end function
public static double code(double x, double y) {
return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673;
}
def code(x, y): return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673
function code(x, y) return Float64(Float64(Float64(x * Float64(y - 1.0)) - Float64(y * 0.5)) + 0.918938533204673) end
function tmp = code(x, y) tmp = ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673; end
code[x_, y_] := N[(N[(N[(x * N[(y - 1.0), $MachinePrecision]), $MachinePrecision] - N[(y * 0.5), $MachinePrecision]), $MachinePrecision] + 0.918938533204673), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (+ (- (* x (- y 1.0)) (* y 0.5)) 0.918938533204673))
double code(double x, double y) {
return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * (y - 1.0d0)) - (y * 0.5d0)) + 0.918938533204673d0
end function
public static double code(double x, double y) {
return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673;
}
def code(x, y): return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673
function code(x, y) return Float64(Float64(Float64(x * Float64(y - 1.0)) - Float64(y * 0.5)) + 0.918938533204673) end
function tmp = code(x, y) tmp = ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673; end
code[x_, y_] := N[(N[(N[(x * N[(y - 1.0), $MachinePrecision]), $MachinePrecision] - N[(y * 0.5), $MachinePrecision]), $MachinePrecision] + 0.918938533204673), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673
\end{array}
(FPCore (x y) :precision binary64 (+ (- (* x (+ y -1.0)) (* y 0.5)) 0.918938533204673))
double code(double x, double y) {
return ((x * (y + -1.0)) - (y * 0.5)) + 0.918938533204673;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * (y + (-1.0d0))) - (y * 0.5d0)) + 0.918938533204673d0
end function
public static double code(double x, double y) {
return ((x * (y + -1.0)) - (y * 0.5)) + 0.918938533204673;
}
def code(x, y): return ((x * (y + -1.0)) - (y * 0.5)) + 0.918938533204673
function code(x, y) return Float64(Float64(Float64(x * Float64(y + -1.0)) - Float64(y * 0.5)) + 0.918938533204673) end
function tmp = code(x, y) tmp = ((x * (y + -1.0)) - (y * 0.5)) + 0.918938533204673; end
code[x_, y_] := N[(N[(N[(x * N[(y + -1.0), $MachinePrecision]), $MachinePrecision] - N[(y * 0.5), $MachinePrecision]), $MachinePrecision] + 0.918938533204673), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y + -1\right) - y \cdot 0.5\right) + 0.918938533204673
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y)
:precision binary64
(if (<= y -1.65e+21)
(* x y)
(if (<= y -1.85e-140)
(- x)
(if (<= y -3.5e-161)
0.918938533204673
(if (<= y 2.02e-41) (- x) (* x y))))))
double code(double x, double y) {
double tmp;
if (y <= -1.65e+21) {
tmp = x * y;
} else if (y <= -1.85e-140) {
tmp = -x;
} else if (y <= -3.5e-161) {
tmp = 0.918938533204673;
} else if (y <= 2.02e-41) {
tmp = -x;
} else {
tmp = x * 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.65d+21)) then
tmp = x * y
else if (y <= (-1.85d-140)) then
tmp = -x
else if (y <= (-3.5d-161)) then
tmp = 0.918938533204673d0
else if (y <= 2.02d-41) then
tmp = -x
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.65e+21) {
tmp = x * y;
} else if (y <= -1.85e-140) {
tmp = -x;
} else if (y <= -3.5e-161) {
tmp = 0.918938533204673;
} else if (y <= 2.02e-41) {
tmp = -x;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.65e+21: tmp = x * y elif y <= -1.85e-140: tmp = -x elif y <= -3.5e-161: tmp = 0.918938533204673 elif y <= 2.02e-41: tmp = -x else: tmp = x * y return tmp
function code(x, y) tmp = 0.0 if (y <= -1.65e+21) tmp = Float64(x * y); elseif (y <= -1.85e-140) tmp = Float64(-x); elseif (y <= -3.5e-161) tmp = 0.918938533204673; elseif (y <= 2.02e-41) tmp = Float64(-x); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.65e+21) tmp = x * y; elseif (y <= -1.85e-140) tmp = -x; elseif (y <= -3.5e-161) tmp = 0.918938533204673; elseif (y <= 2.02e-41) tmp = -x; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.65e+21], N[(x * y), $MachinePrecision], If[LessEqual[y, -1.85e-140], (-x), If[LessEqual[y, -3.5e-161], 0.918938533204673, If[LessEqual[y, 2.02e-41], (-x), N[(x * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+21}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{-140}:\\
\;\;\;\;-x\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-161}:\\
\;\;\;\;0.918938533204673\\
\mathbf{elif}\;y \leq 2.02 \cdot 10^{-41}:\\
\;\;\;\;-x\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if y < -1.65e21 or 2.0199999999999999e-41 < y Initial program 100.0%
cancel-sign-sub-inv100.0%
+-commutative100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
neg-mul-1100.0%
associate-+r+100.0%
unsub-neg100.0%
associate-+l-100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
distribute-lft-out100.0%
fma-neg100.0%
+-commutative100.0%
metadata-eval100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
fma-undefine100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 47.7%
Taylor expanded in y around inf 45.0%
if -1.65e21 < y < -1.84999999999999989e-140 or -3.5000000000000002e-161 < y < 2.0199999999999999e-41Initial program 100.0%
cancel-sign-sub-inv100.0%
+-commutative100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
neg-mul-1100.0%
associate-+r+100.0%
unsub-neg100.0%
associate-+l-100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
distribute-lft-out100.0%
fma-neg100.0%
+-commutative100.0%
metadata-eval100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
fma-undefine100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 62.2%
Taylor expanded in y around 0 62.1%
mul-1-neg62.1%
Simplified62.1%
if -1.84999999999999989e-140 < y < -3.5000000000000002e-161Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 93.9%
Taylor expanded in y around 0 93.9%
(FPCore (x y) :precision binary64 (if (or (<= y -1.15e+28) (not (<= y 2.35e-6))) (* y (- x 0.5)) (- 0.918938533204673 x)))
double code(double x, double y) {
double tmp;
if ((y <= -1.15e+28) || !(y <= 2.35e-6)) {
tmp = y * (x - 0.5);
} else {
tmp = 0.918938533204673 - 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.15d+28)) .or. (.not. (y <= 2.35d-6))) then
tmp = y * (x - 0.5d0)
else
tmp = 0.918938533204673d0 - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.15e+28) || !(y <= 2.35e-6)) {
tmp = y * (x - 0.5);
} else {
tmp = 0.918938533204673 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.15e+28) or not (y <= 2.35e-6): tmp = y * (x - 0.5) else: tmp = 0.918938533204673 - x return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.15e+28) || !(y <= 2.35e-6)) tmp = Float64(y * Float64(x - 0.5)); else tmp = Float64(0.918938533204673 - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.15e+28) || ~((y <= 2.35e-6))) tmp = y * (x - 0.5); else tmp = 0.918938533204673 - x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.15e+28], N[Not[LessEqual[y, 2.35e-6]], $MachinePrecision]], N[(y * N[(x - 0.5), $MachinePrecision]), $MachinePrecision], N[(0.918938533204673 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+28} \lor \neg \left(y \leq 2.35 \cdot 10^{-6}\right):\\
\;\;\;\;y \cdot \left(x - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;0.918938533204673 - x\\
\end{array}
\end{array}
if y < -1.14999999999999992e28 or 2.34999999999999995e-6 < y Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 98.1%
if -1.14999999999999992e28 < y < 2.34999999999999995e-6Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 98.3%
neg-mul-198.3%
sub-neg98.3%
Simplified98.3%
Final simplification98.2%
(FPCore (x y) :precision binary64 (if (or (<= x -1.02e+37) (not (<= x 128000.0))) (* x (+ y -1.0)) (- 0.918938533204673 x)))
double code(double x, double y) {
double tmp;
if ((x <= -1.02e+37) || !(x <= 128000.0)) {
tmp = x * (y + -1.0);
} else {
tmp = 0.918938533204673 - x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-1.02d+37)) .or. (.not. (x <= 128000.0d0))) then
tmp = x * (y + (-1.0d0))
else
tmp = 0.918938533204673d0 - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x <= -1.02e+37) || !(x <= 128000.0)) {
tmp = x * (y + -1.0);
} else {
tmp = 0.918938533204673 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if (x <= -1.02e+37) or not (x <= 128000.0): tmp = x * (y + -1.0) else: tmp = 0.918938533204673 - x return tmp
function code(x, y) tmp = 0.0 if ((x <= -1.02e+37) || !(x <= 128000.0)) tmp = Float64(x * Float64(y + -1.0)); else tmp = Float64(0.918938533204673 - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x <= -1.02e+37) || ~((x <= 128000.0))) tmp = x * (y + -1.0); else tmp = 0.918938533204673 - x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[x, -1.02e+37], N[Not[LessEqual[x, 128000.0]], $MachinePrecision]], N[(x * N[(y + -1.0), $MachinePrecision]), $MachinePrecision], N[(0.918938533204673 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+37} \lor \neg \left(x \leq 128000\right):\\
\;\;\;\;x \cdot \left(y + -1\right)\\
\mathbf{else}:\\
\;\;\;\;0.918938533204673 - x\\
\end{array}
\end{array}
if x < -1.01999999999999995e37 or 128000 < x Initial program 100.0%
cancel-sign-sub-inv100.0%
+-commutative100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
neg-mul-1100.0%
associate-+r+100.0%
unsub-neg100.0%
associate-+l-100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
distribute-lft-out100.0%
fma-neg100.0%
+-commutative100.0%
metadata-eval100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
fma-undefine100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 98.4%
if -1.01999999999999995e37 < x < 128000Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 45.2%
neg-mul-145.2%
sub-neg45.2%
Simplified45.2%
Final simplification71.6%
(FPCore (x y) :precision binary64 (if (or (<= y -1.45e+51) (not (<= y 2.9e-19))) (* x y) (- 0.918938533204673 x)))
double code(double x, double y) {
double tmp;
if ((y <= -1.45e+51) || !(y <= 2.9e-19)) {
tmp = x * y;
} else {
tmp = 0.918938533204673 - 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.45d+51)) .or. (.not. (y <= 2.9d-19))) then
tmp = x * y
else
tmp = 0.918938533204673d0 - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.45e+51) || !(y <= 2.9e-19)) {
tmp = x * y;
} else {
tmp = 0.918938533204673 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.45e+51) or not (y <= 2.9e-19): tmp = x * y else: tmp = 0.918938533204673 - x return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.45e+51) || !(y <= 2.9e-19)) tmp = Float64(x * y); else tmp = Float64(0.918938533204673 - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.45e+51) || ~((y <= 2.9e-19))) tmp = x * y; else tmp = 0.918938533204673 - x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.45e+51], N[Not[LessEqual[y, 2.9e-19]], $MachinePrecision]], N[(x * y), $MachinePrecision], N[(0.918938533204673 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+51} \lor \neg \left(y \leq 2.9 \cdot 10^{-19}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;0.918938533204673 - x\\
\end{array}
\end{array}
if y < -1.4499999999999999e51 or 2.9e-19 < y Initial program 100.0%
cancel-sign-sub-inv100.0%
+-commutative100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
neg-mul-1100.0%
associate-+r+100.0%
unsub-neg100.0%
associate-+l-100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
distribute-lft-out100.0%
fma-neg100.0%
+-commutative100.0%
metadata-eval100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
fma-undefine100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 46.6%
Taylor expanded in y around inf 45.2%
if -1.4499999999999999e51 < y < 2.9e-19Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 95.6%
neg-mul-195.6%
sub-neg95.6%
Simplified95.6%
Final simplification70.4%
(FPCore (x y) :precision binary64 (if (or (<= x -86000000.0) (not (<= x 0.92))) (- x) 0.918938533204673))
double code(double x, double y) {
double tmp;
if ((x <= -86000000.0) || !(x <= 0.92)) {
tmp = -x;
} else {
tmp = 0.918938533204673;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-86000000.0d0)) .or. (.not. (x <= 0.92d0))) then
tmp = -x
else
tmp = 0.918938533204673d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x <= -86000000.0) || !(x <= 0.92)) {
tmp = -x;
} else {
tmp = 0.918938533204673;
}
return tmp;
}
def code(x, y): tmp = 0 if (x <= -86000000.0) or not (x <= 0.92): tmp = -x else: tmp = 0.918938533204673 return tmp
function code(x, y) tmp = 0.0 if ((x <= -86000000.0) || !(x <= 0.92)) tmp = Float64(-x); else tmp = 0.918938533204673; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x <= -86000000.0) || ~((x <= 0.92))) tmp = -x; else tmp = 0.918938533204673; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[x, -86000000.0], N[Not[LessEqual[x, 0.92]], $MachinePrecision]], (-x), 0.918938533204673]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -86000000 \lor \neg \left(x \leq 0.92\right):\\
\;\;\;\;-x\\
\mathbf{else}:\\
\;\;\;\;0.918938533204673\\
\end{array}
\end{array}
if x < -8.6e7 or 0.92000000000000004 < x Initial program 100.0%
cancel-sign-sub-inv100.0%
+-commutative100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
neg-mul-1100.0%
associate-+r+100.0%
unsub-neg100.0%
associate-+l-100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
distribute-lft-out100.0%
fma-neg100.0%
+-commutative100.0%
metadata-eval100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
fma-undefine100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 97.8%
Taylor expanded in y around 0 54.0%
mul-1-neg54.0%
Simplified54.0%
if -8.6e7 < x < 0.92000000000000004Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 97.0%
Taylor expanded in y around 0 40.8%
Final simplification47.7%
(FPCore (x y) :precision binary64 (+ (- 0.918938533204673 x) (* y (+ x -0.5))))
double code(double x, double y) {
return (0.918938533204673 - x) + (y * (x + -0.5));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (0.918938533204673d0 - x) + (y * (x + (-0.5d0)))
end function
public static double code(double x, double y) {
return (0.918938533204673 - x) + (y * (x + -0.5));
}
def code(x, y): return (0.918938533204673 - x) + (y * (x + -0.5))
function code(x, y) return Float64(Float64(0.918938533204673 - x) + Float64(y * Float64(x + -0.5))) end
function tmp = code(x, y) tmp = (0.918938533204673 - x) + (y * (x + -0.5)); end
code[x_, y_] := N[(N[(0.918938533204673 - x), $MachinePrecision] + N[(y * N[(x + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.918938533204673 - x\right) + y \cdot \left(x + -0.5\right)
\end{array}
Initial program 100.0%
cancel-sign-sub-inv100.0%
+-commutative100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
neg-mul-1100.0%
associate-+r+100.0%
unsub-neg100.0%
associate-+l-100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
distribute-lft-out100.0%
fma-neg100.0%
+-commutative100.0%
metadata-eval100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
fma-undefine100.0%
+-commutative100.0%
Applied egg-rr100.0%
(FPCore (x y) :precision binary64 0.918938533204673)
double code(double x, double y) {
return 0.918938533204673;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 0.918938533204673d0
end function
public static double code(double x, double y) {
return 0.918938533204673;
}
def code(x, y): return 0.918938533204673
function code(x, y) return 0.918938533204673 end
function tmp = code(x, y) tmp = 0.918938533204673; end
code[x_, y_] := 0.918938533204673
\begin{array}{l}
\\
0.918938533204673
\end{array}
Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 70.7%
Taylor expanded in y around 0 20.9%
herbie shell --seed 2024105
(FPCore (x y)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, A"
:precision binary64
(+ (- (* x (- y 1.0)) (* y 0.5)) 0.918938533204673))