CPFloat: A C Library for Simulating Low-precision Arithmetic
ACM Transactions on Mathematical Software · 30.06.2023 · 49 (2) · 1-32
DOI: 10.1145/3585515 ↗Kurz gefasst
Fachartikel in der Zeitschrift ACM Transactions on Mathematical Software, online erschienen am 17.06.2023. Verfasst von Massimiliano Fasi und 1 weiteren Autor:innen. Die Arbeit wurde bisher 14-mal zitiert (Crossref) und nennt 60 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Royal Society, by Istituto Nazionale di Alta Matematica INdAM-GNCS Project 2020, and by Wenner-Gren Foundations, EPSRC Doctoral Prize Fellowship and by EPSRC, Department of Mathematics, the University of Manchester.
Abstract (Originalsprache)
One can simulate low-precision floating-point arithmetic via software by executing each arithmetic operation in hardware and then rounding the result to the desired number of significant bits. For IEEE-compliant formats, rounding requires only standard mathematical library functions, but handling subnormals, underflow, and overflow demands special attention, and numerical errors can cause mathematically correct formulae to behave incorrectly in finite arithmetic. Moreover, the ensuing implementations are not necessarily efficient, as the library functions these techniques build upon are typically designed to handle a broad range of cases and may not be optimized for the specific needs of rounding algorithms. CPFloat is a C library for simulating low-precision arithmetics. It offers efficient routines for rounding, performing mathematical computations, and querying properties of the simulated low-precision format. The software exploits the bit-level floating-point representation of the format in which the numbers are stored and replaces costly library calls with low-level bit manipulations and integer arithmetic. In numerical experiments, the new techniques bring a considerable speedup (typically one order of magnitude or more) over existing alternatives in C, C++, and MATLAB. To our knowledge, CPFloat is currently the most efficient and complete library for experimenting with custom low-precision floating-point arithmetic.
Förderung
- Royal Society, by Istituto Nazionale di Alta Matematica INdAM-GNCS Project 2020, and by Wenner-Gren Foundations
- EPSRC Doctoral Prize Fellowship and by EPSRC
- Department of Mathematics, the University of Manchester
- School of Science and Technology, Örebro University, Örebro
Zitieren
APA
Fasi, M., & Mikaitis, M. (2023). CPFloat: A C Library for Simulating Low-precision Arithmetic. ACM Transactions on Mathematical Software, 49(2), 1-32. https://doi.org/10.1145/3585515
Vancouver
Fasi M, Mikaitis M. CPFloat: A C Library for Simulating Low-precision Arithmetic. ACM Transactions on Mathematical Software. 2023;49(2):1-32. doi:10.1145/3585515
BibTeX
@article{Fasi2023,
author = {Fasi, Massimiliano and Mikaitis, Mantas},
title = {CPFloat: A C Library for Simulating Low-precision Arithmetic},
journal = {ACM Transactions on Mathematical Software},
year = {2023},
volume = {49},
number = {2},
pages = {1--32},
doi = {10.1145/3585515}
}
EUVIMED