fix inconsistent typing in divisor()

Code to address issue 3882.