div_num can handle two smallint values now.

may be worth it to specialize for "only a is big" and
"only b is big" later on?
bigint_rand without smallint support