paper

Construction and Performance Evaluation of an Arbitrary-Precision Floating-Point Arithmetic Environment on CUDA

arXiv:2608.00085

Abstract

Arbitrary-precision floating-point arithmetic is used to solve ill-conditioned problems in scientific computing, and MPFR and MPC have become the de facto standard libraries for CPU-based computations. However, no publicly available environment provides MPFR/MPC functionality on GPUs. In this study, we developed mpc\_cuda, an arbitrary-precision arithmetic environment for GPUs, by leveraging generative AI (Claude Code) and rerunnable conversion scripts to faithfully port the mini-GMP-based MPFR/MPC libraries to CUDA kernels while reserving a per-thread temporary storage region (a bump arena). This approach accelerates real and complex elementary functions and basic linear algebra on GPUs by approximately 40--105, while remaining bit-identical to the host. In addition, we implemented compile-time fixed-precision types cu\_freal/cu\_fcomplex, and demonstrate, through benchmark tests involving the GMRES() method and algebraic equation solving on GB10 and H100 GPUs, that the proposed implementation outperforms the existing GPU libraries CUMP and CAMPARY at low-to-medium precision.

Construction and Performance Evaluation of an Arbitrary-Precision Floating-Point Arithmetic Environment on CUDA · wovepaper