This paper presents an approach to real function approximation around a point using Taylor polynomials. This approach generates a target-specific machine code using Taylor polynomials of some standard mathematical functions and polynomial arithmetic. Furthermore, it improves performance by eliminating excess function calls and minimizing spatial locality, while modelling the behaviour of approximation error(s). The implementation relies on LLVM for intermediate representation and target-specific machine code generation. Performance benchmarks demonstrate a ~ 50% reduction in evaluation time, measured in clock cycles, compared to GNU C Library implementation. This method is sufficient for optimizing real mathematical functions with known input ranges at compile time, offering potential applications in general-purpose compilers.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Real Function Approximation Around a Point with Taylor Polynomials Using Custom Machine Code

  • Andreja Janković,
  • Dragan Bojić

摘要

This paper presents an approach to real function approximation around a point using Taylor polynomials. This approach generates a target-specific machine code using Taylor polynomials of some standard mathematical functions and polynomial arithmetic. Furthermore, it improves performance by eliminating excess function calls and minimizing spatial locality, while modelling the behaviour of approximation error(s). The implementation relies on LLVM for intermediate representation and target-specific machine code generation. Performance benchmarks demonstrate a ~ 50% reduction in evaluation time, measured in clock cycles, compared to GNU C Library implementation. This method is sufficient for optimizing real mathematical functions with known input ranges at compile time, offering potential applications in general-purpose compilers.