Advertisement

Replacing Branches by Polynomials in Vectorizable Elementary Functions

  • Olga KupriianovaEmail author
  • Christoph Lauter
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9553)

Abstract

One of the goals for the mathematical function generator is to produce vectorizable codes. Therefore, in the generated code there should be no branching. As the most mathematical functions are implemented with domain splitting procedure and piecewise-polynomial approximation, there are several if-else statements in the final code to determine the corresponding polynomial coefficients. In this paper we propose a simple idea of replacing these if-else statements by the evaluation of a polynomial function. This is a novel approach that may not work for all the possible function implementation variants, and it needs to be improved with the use of some more sophisticated methods.

Keywords

Mathematical functions Branching Vectorizable code Interpolation Reconstruction 

References

  1. 1.
    Loosemore, R.M.S.e.a.S.: The GNU C Library Reference Manual. Free Software Foundation IncGoogle Scholar
  2. 2.
    Kupriianova, O., Lauter, C.: Metalibm: a mathematical functions codegenerator. In: Proceedings of the 2014 Mathematical Software - ICMS 2014 - 4th International Congress, Seoul, South Korea, 5–9 August 2014, pp.713–717. http://dx.doi.org/10.1007/978-3-662-44199-2_106CrossRefGoogle Scholar
  3. 3.
    Muller, J.-M.: Elementary Functions: Algorithms and Implementation. Birkhauser Boston Inc., Secaucus (1997)CrossRefGoogle Scholar
  4. 4.
    Brisebarre, N., Chevillard, S.: Efficient polynomial l-approximations. In: 18th IEEE Symposium on Computer Arithmetic (ARITH-18 2007), 25–27 June 2007, Montpellier, France, pp. 169–176 (2007). http://doi.ieeecomputersociety.org/10.1109/ARITH.2007.17
  5. 5.
    Tang, P.T.P.: Table-driven implementation of the exponential function in IEEE floating-point arithmetic. ACM Trans. Math. Softw. 15(2), 144–157 (1989)CrossRefGoogle Scholar
  6. 6.
    Tang, P.T.P.: Table-driven implementation of the logarithm function in IEEE floating-point arithmetic. ACM Trans. Math. Softw. 16(4), 378–400 (1990). http://acm.org/10.1145/98267.98294CrossRefGoogle Scholar
  7. 7.
    Tang, P.T.P.: Table-driven implementation of the Expm1 function in IEEE floating-point arithmetic. ACM Trans. Math. Softw. 18(2), 211–222 (1992). http://doi.acm.org/10.1145/146847.146928CrossRefGoogle Scholar
  8. 8.
    Kupriianova, O., Lauter, C.: A domain splitting algorithm for the mathematical functions code generator. In: Asilomar Conference on Signals, Systems and Computers, Pacific Grove, CA, USA, 2–5 November 2014 (2014, to appear)Google Scholar
  9. 9.
    Chevillard, S., Joldeş, M., Lauter, C.: Sollya: an environment for the development of numerical codes. In: Fukuda, K., Hoeven, J., Joswig, M., Takayama, N. (eds.) ICMS 2010. LNCS, vol. 6327, pp. 28–31. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  10. 10.
    Brunie, N., de Dinechin, F., Kupriianova, O., Lauter, C.: Code generators for mathematical functions (2014). \(<\)hal-01084726v2\(>\)Google Scholar
  11. 11.
    Cheney, E.W.: Introduction to Approximation Theory. AMS Chelsea Publishing, New York (1982)zbMATHGoogle Scholar
  12. 12.
    Shary, S.P.: Solving the linear interval tolerance problem. Math. Comput. Simul. 39, 53–85 (1995)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial 2.5 International License (http://creativecommons.org/licenses/by-nc/2.5/), which permits any noncommercial use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

Authors and Affiliations

  1. 1.Sorbonne Universités, UPMC Univ Paris 06, UMR 7606, LIP6ParisFrance

Personalised recommendations