Pascal user manual and report; 3rd ed.
Pascal user manual and report; 3rd ed.
Common LISP: the language
Representational and Denotational Semantics of Digital Systems
IEEE Transactions on Computers
The art of computer programming, volume 1 (3rd ed.): fundamental algorithms
The art of computer programming, volume 1 (3rd ed.): fundamental algorithms
Multiplexed Buses: the Endian Wars Continue
IEEE Micro
APL '79 Proceedings of the international conference on APL: part 1
Arithmetic shifting considered harmful
ACM SIGPLAN Notices
Division by invariant integers using multiplication
PLDI '94 Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation
Computer algebra handbook
Functional declarative language design and predicate calculus: a practical approach
ACM Transactions on Programming Languages and Systems (TOPLAS)
Bandwidth Allocation with Half-Duplex Stations in IEEE 802.16 Wireless Networks
IEEE Transactions on Mobile Computing
Collusion-resistant privacy-preserving data mining
Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining
Pointfree expression and calculation: from quantification to temporal logic
Formal Methods in System Design
Time bounds for periodic hypercube gossiping
Proceedings of the 1st International Workshop on Worst-Case Traversal Time
The TPTP typed first-order form with arithmetic
LPAR'12 Proceedings of the 18th international conference on Logic for Programming, Artificial Intelligence, and Reasoning
Modulo intervals: a proposed notation
ACM SIGACT News
Hi-index | 0.00 |
The definitions of the functions div and mod in the computer science literature and in programming languages are either similar to the Algol of Pascal definition (which is shown to be an unfortunate choice) or based on division by truncation (T-definition) or division by flooring as defined by Knuth (F-definition). The differences between various definitions that are in common usage are discussed, and an additional one is proposed, which is based on Euclid's theorem and therefore is called the Euclidean definition (E-definition). Its distinguishing feature is that 0 ≤ D mod d irrespective of the signs of D and d. It is argued that the E- and F-definitions are superior to all other ones in regularity and useful mathematical properties and hence deserve serious consideration as the standard convention at the applications and language level. It is also shown that these definitions are the most suitable ones for describing number representation systems and the realization of arithmetic operations at the architecture and hardware level.