Input processing performed by defmin-int.
Currently this validates the inputs lightly. It should be improved to do a more thorough validation.