>>579

int func(double x)
{
int v;
if(x<0) x-=0.5;
else x+=0.5;
v = x;
return v;
}