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...
详细信息
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 ***, 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 variableprecision 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.
暂无评论