Fast calculation of the exponential function using tables
Authors
-
Eugene I. Vasilev
-
Grigorii А. Ionov
-
Mikhail А. Ionov
Keywords:
transcendental functions
architecture x86-64
Riemann problem
acceleration of calculations
tabulation of functions
AVX
AVX2
FMA
Abstract
In this paper, algorithms are described and compact software modules in the C language are presented for fast calculation of the exponential and logarithmic functions using tables for x86-64 architecture processors. The accuracy was evaluated and the performance was compared for some AMD and Intel processors. Generalization of the tabular approach has been implemented and tested for some trigonometric functions. On average, the proposed functions work 10 times faster than corresponding analogues from the standard mathematical library with prototypes in math.h.
Section
Methods and algorithms of computational mathematics and their applications
References
- E. I. Vasilev and T. A. Vasilyeva, “Multi-Implicit Methods with Automatic Error Control in Applications with Chemical Reactions,” Zh. Vychisl. Mat. Mat. Fiz. 59 (9), 1570-1580 (2019) [Comput. Math. Math. Phys. 59 (9), 1508-1517 (2019).
doi 10.1134/S0965542519090161].
- E. I. Vasilev, “A W-Modification of Godunov’s Method and Its Application to Two-Dimensional Non-Stationary Flows of a Dusty Gas,” Zh. Vychisl. Mat. Mat. Fiz. 36 (1), 122-135 (1996) [Comput. Math. Math. Phys. 36 (1), 101-112 (1996)].
https://dl.acm.org/doi/10.5555/229332.229355 . Cited March 23, 2023.
- S. K. Godunov, A. V. Zabrodin, M. Ya. Ivanov, A. H. Kraiko, and G. P. Prokopov, Numerical Solution of Multidimensional Problems of Gas Dynamics (Nauka, Moscow, 1976) [in Russian].
- A. G. Kulikovskii, N. V. Pogorelov, and A. Yu. Semenov, Mathematical Aspects of Numerical Solution of Hyperbolic Systems (Fizmatlit, Moscow, 2001; CRC Press, Boca Raton, 2001).
- K. Hornung, Yu. G. Malama, and K. Thoma, “Modeling of the Very High Velocity Impact Process with Respect to In-situ Ionization Measurements,” Adv. Space Res. 17 (12), 77-86 (1996).
doi 10.1016/0273-1177(95)00762-4.
- A. V. Safronov, “Kinetic Schemes for Gas Dynamics Equations,” Numerical Methods and Programming (Vychislitel’nye Metody i Programmirovanie), 10 (1), 62-74 (2009).
https://en.num-meth.ru/index.php/journal/article/view/348 . Cited March 23, 2023.
- E. I. Vasilev and V. A. Shatov, “Unit Testing of the Effectiveness of Two 6th Order Implicit Methods for Chemical Kinetics Problems,” in Proc. of the Institute of Mathematics and Information Technologies (Volgograd State University, Volgograd, 2021), pp. 15-26.
https://www.elibrary.ru/item.asp?id=48701531 . Cited March 23, 2023.
- A. A. Samarskii and A. V. Gulin, Numerical Methods (Nauka, Moscow, 1989) [in Russian].
- AMD64 Architecture Programmer’s Manual. Volume 4: 128-bit and 256-bit Media Instructions. No 26568. November 2021.
https://www.amd.com/system/files/TechDocs/26568.pdf . Cited March 20, 2023.
- T. Hauth, V. Innocente, and D. Piparo, “Development and Evaluation of Vectorised and Multi-Core Event Reconstruction Algorithms within the CMS Software Framework,” J. Phys.: Conf. Ser. 396, Article Number 052065 (2012).
doi 10.1088/1742-6596/396/5/052065.
- CERN VDT (VectoriseD maTh) C++ Fast Math. Library.
https://github.com/drbenmorgan/vdt . Cited March 20, 2023.