Fasi, Massimiliano and Mikaitis, Mantas (2020) CPFloat: A C library for simulating low-precision arithmetic. [MIMS Preprint] (Unpublished)
Text
fami22.pdf Download (788kB) |
Abstract
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 available in any language.
Item Type: | MIMS Preprint |
---|---|
Subjects: | MSC 2010, the AMS's Mathematics Subject Classification > 65 Numerical analysis |
Depositing User: | Mr Massimiliano Fasi |
Date Deposited: | 22 May 2022 06:54 |
Last Modified: | 22 May 2022 06:54 |
URI: | https://eprints.maths.manchester.ac.uk/id/eprint/2855 |
Available Versions of this Item
-
CPFloat: A C library for emulating low-precision arithmetic. (deposited 20 Oct 2020 10:59)
-
CPFloat: A C library for simulating low-precision arithmetic. (deposited 06 Mar 2022 09:32)
- CPFloat: A C library for simulating low-precision arithmetic. (deposited 22 May 2022 06:54) [Currently Displayed]
-
CPFloat: A C library for simulating low-precision arithmetic. (deposited 06 Mar 2022 09:32)
Actions (login required)
View Item |