plot (sin((2(floor(pi/(4arcsin(sqrt(p)))))+1)arcsin(sqrt(p)))^2) from 0 to 0.5