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.
This is a preview of subscription content, log in via an institution.
References
Loosemore, R.M.S.e.a.S.: The GNU C Library Reference Manual. Free Software Foundation Inc
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_106
Muller, J.-M.: Elementary Functions: Algorithms and Implementation. Birkhauser Boston Inc., Secaucus (1997)
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
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)
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.98294
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.146928
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)
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)
Brunie, N., de Dinechin, F., Kupriianova, O., Lauter, C.: Code generators for mathematical functions (2014). \(<\)hal-01084726v2\(>\)
Cheney, E.W.: Introduction to Approximation Theory. AMS Chelsea Publishing, New York (1982)
Shary, S.P.: Solving the linear interval tolerance problem. Math. Comput. Simul. 39, 53–85 (1995)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
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.
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Kupriianova, O., Lauter, C. (2016). Replacing Branches by Polynomials in Vectorizable Elementary Functions. In: Nehmeier, M., Wolff von Gudenberg, J., Tucker, W. (eds) Scientific Computing, Computer Arithmetic, and Validated Numerics. SCAN 2015. Lecture Notes in Computer Science(), vol 9553. Springer, Cham. https://doi.org/10.1007/978-3-319-31769-4_2
Download citation
DOI: https://doi.org/10.1007/978-3-319-31769-4_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-31768-7
Online ISBN: 978-3-319-31769-4
eBook Packages: Computer ScienceComputer Science (R0)