Skip to Main content Skip to Navigation
Conference papers

Semi-automatic implementation of the complementary error function

Anastasia Volkova 1 Jean-Michel Muller 1
1 ARIC - Arithmetic and Computing
Inria Grenoble - Rhône-Alpes, LIP - Laboratoire de l'Informatique du Parallélisme
Abstract : The normal and complementary error functions are ubiquitous special functions for any mathematical library. They have a wide range of applications. Practical applications call for customized implementations that have strict accuracy requirements. Accurate numerical implementation of these functions is, however, non-trivial. In particular, the complementary error function erfc for large positive arguments heavily suffers from cancellation, which is largely due to its asymptotic behavior. We provide a semi-automatic code generator for the erfc function which is parameterized by the user-given bound on the relative error. Our solution exploits the asymptotic expression of erfc and leverages the automatic code generator Metalibm that provides accurate polynomial approximations. A fine-grained a priori error analysis provides a libm developer with the required accuracy for each step of the evaluation. In critical parts, we exploit double-word arithmetic to achieve implementations that are fast, yet accurate up to 50 bits, even for large input arguments. We demonstrate that for high required accuracies the automatically generated code has performance comparable to that of the standard libm and for lower ones our code demonstrated roughly 25% speedup.
Complete list of metadatas

Cited literature [15 references]  Display  Hide  Download

https://hal.archives-ouvertes.fr/hal-02002315
Contributor : Jean-Michel Muller <>
Submitted on : Thursday, April 4, 2019 - 3:18:18 PM
Last modification on : Thursday, November 21, 2019 - 1:44:03 AM
Document(s) archivé(s) le : Friday, July 5, 2019 - 3:08:17 PM

File

arith26.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-02002315, version 2

Collections

Citation

Anastasia Volkova, Jean-Michel Muller. Semi-automatic implementation of the complementary error function. ARITH 2019 - 26th IEEE Symposium on Computer Arithmetic, Jun 2019, Kyoto, Japan. pp.1-8. ⟨hal-02002315v2⟩

Share

Metrics

Record views

140

Files downloads

227