Semi-automatic implementation of the complementary error function

Anastasia Volkova 1 Jean-Michel Muller 1, 2
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 in probability and statistics. 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. In this paper 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 erfc's asymptotic expression 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 erfc evaluation. In critical parts, we exploit double-word (also called "double-double" in the literature) 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.
Type de document :
Pré-publication, Document de travail
2019
Liste complète des métadonnées

https://hal.archives-ouvertes.fr/hal-02002315
Contributeur : Jean-Michel Muller <>
Soumis le : jeudi 31 janvier 2019 - 15:54:12
Dernière modification le : vendredi 1 février 2019 - 01:21:02

Fichier

arith26-HalV1.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-02002315, version 1

Collections

Citation

Anastasia Volkova, Jean-Michel Muller. Semi-automatic implementation of the complementary error function. 2019. 〈hal-02002315〉

Partager

Métriques

Consultations de la notice

46

Téléchargements de fichiers

50