Factorise cubic polynomials (#308)