It seems to me that the compiler should emit one idiv (x86) for the following code: long long foo; long bar, result,rem; : : : result = foo / bar; rem = foo % bar; But it calls a library routine instead. Am I being unreasonable, or is there a trick I am missing? George