A generalization of a theorem by C. Miranda