fixed complex formatting problem, added long double support to matgen