Step further to correctly behaving ptpfun and ptpfundual

ptpfun: negative weight and big L no longer blow up numerically
ptpfundual: fixed the dual window periodization