Mod[-3.-2Sqrt[2],1]

Sqrt[2.]

Mod[1-Sqrt[2.],1]

f[{x_,y_}]:={Mod[x+1.-Sqrt[2],1],Mod[y+1.+Sqrt[2],1]};
Do[Print[Nest[f,{1/4,3/8},i]],{i,10}]

ContourPlot[.5*y^2-1/(2Pi)*Cos[2*Pi*x],{x,-1,1},{y,-1,1},Contours->{-1/(2Pi),-.9/(2Pi),-1/(4Pi),0,1/(4Pi),1/(2Pi),3/(4Pi),1/Pi}]