Euclidean Affine Functions and Applications to Calendar Algorithms
Cassio Neri, Lorenz Schneider

TL;DR
This paper investigates properties of Euclidean affine functions and their applications to optimizing calendar algorithms, leading to significantly faster implementations in common programming languages.
Contribution
It introduces algebraic relations and approximations for Euclidean affine functions, enabling more efficient calendar computations in modern CPUs.
Findings
Achieved speedups of twofold or more in calendar algorithms
Derived algebraic relations for Euclidean affine functions
Improved efficiency of common division and remainder operations
Abstract
We study properties of Euclidean affine functions (EAFs), namely those of the form , and their closely related expression , where , , and are integers, and where and respectively denote the quotient and remainder of Euclidean division. We derive algebraic relations and numerical approximations that are important for the efficient evaluation of these expressions in modern CPUs. Since simple division and remainder are particular cases of EAFs (when and ), the optimisations proposed in this paper can also be appplied to them. Such expressions appear in some of the most common tasks in any computer system, such as printing numbers, times and dates. We use calendar calculations as the main application example because it is richer with respect…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Mathematical Theories and Applications · Numerical Methods and Algorithms · Scientific Research and Discoveries
