fix prime size in resultant_modular