
Design and Implementation of Variable Precision Algorithm for Transcendental Functions
Author(s) -
Hao Jiang,
Jiawei Xu,
Song Guo,
YuanYuan Xia,
Dan Liu
Publication year - 2019
Publication title -
journal of physics. conference series
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.21
H-Index - 85
eISSN - 1742-6596
pISSN - 1742-6588
DOI - 10.1088/1742-6596/1325/1/012119
Subject(s) - computer science , transcendental function , function (biology) , variable (mathematics) , algorithm , rounding , code (set theory) , mathematical model , mathematics , programming language , mathematical analysis , statistics , set (abstract data type) , evolutionary biology , biology , operating system
Mathematical function is an essential part of numerical program, and it is also the key factor that affects the precision and performance of a program. In the design of mathematical functions, in order to satisfy most application scenarios, it is necessary to correctly round and cover the calculated interval as much as possible. But in certain applications, correct rounding and full coverage of definition domain may not be required. Therefore, mathematical functions can be customized according to application requirements to avoid precision waste as well as improve performance. However, manually implementing mathematical functions is a time-consuming and error-prone task. Tools like Metalibm is designed to automatically generate mathematical function code, which is difficult to take advantage of all the mathematical properties of a function and results in the generated code performing slowly than the corresponding mathematical library function. A method of generating variable precision code based on mathematical properties is proposed for the transcendental function in this work. Experiments showed the performance of the proposed method is comparable to Glibc mathematical function.