I can recommend the article in ACM Transactions on Programming Languages
and Systems, back this April (14:2, think it was), which examines the div
and mod functions, points out how faulty some definitions are, gives three
differing useful definitions, and evaluates each in terms of performance,
usefulness, and clarity. Anyone designing or implementing a programming
language should read this (but watch out for the typos).