JaBa:
In German, we have a saying: "Probieren over studieren". Really, really rough translated: "Trying is better than thinking about it"...
Compilers are pretty smart. If you defined two variables, for example as Long, and tried to do Modulo on them, the Compiler will complain if it has no Definition which accepts those Longs. If the Compiler doesn't complain, chances are that it will work. I also don't think you would have to do a Billion tests. Computers being the way they are, if it works with one number, it will work with others, except for the so called border cases. Border cases can be Zero, or the Maximum/Minimum values that the data type can handle.
Hi,
Ha ha, in English we also have a saying, "If you dont know the answer to a question and you know a message board where hundreds of users with experience in the field you are working in at one time or another probably had the same question and already found an answer, then by all means, ask the question".
Loosely translated it means, "Ask and maybe you will receive" 
In other words, i didnt want to have to experiment with this and after all there are so many users that visit this site i would bet that someone tried this already and can give an answer without even thinking about it. Yes, maybe they wont see this thread, but then maybe they will and will be willing to give a direct answer.
I also think it might help to update the doc's to show what types it can take so future users dont have to experiment either.
As a last point, sometimes there are bugs in the codes used and experiences users would know about this too. Maybe it works with type int but with type long it has a bug where it does not work over a certain value like 0x100000 or something like that, and that could be because of the implementation, which i could not find.
Because of the way mod() is sometimes calculated, it may be that the combination of the first number and last number must meet a certain criterion such as a lmiit:
y=firstnumb % lastnumb
In some calculations of this statement, if we declare firstnumb to be type long and lastnumb to be type long, the prototype wont complain, but internally when the calculation is performed it could still cause an error because in order to fully handle type long's it might have to do the actual calculation in type long long. Similarly, if it takes type long long for both then it may not ever be able to handle the full range of those two.
So see there is more to it than just satisfying the prototype definition. We might get lucky and see it fail for any type beyond type int, but then we still dont know if the internal calculation is done with type longs or type int's. If it is done with type int's then there could be a problem with certain combination of values for firstnumb and lastnumb.