indefinite integral of sgn(sin(2^n pi t))^2