BUG: signal: fix a few integer divisions

Note that `type(4/2) is float` -- this code was broken all the time
on Python 3 (2to3 doesn't replace divisions).