The Ins and Outs of Solving Quadratic Equations with Floating-Point Arithmetic - CNRS - Centre national de la recherche scientifique
Pré-Publication, Document De Travail Année : 2023

The Ins and Outs of Solving Quadratic Equations with Floating-Point Arithmetic

Résumé

Solving quadratic equations with radicals on a computer with floating-point arithmetic requires great care to handle correctly all possible parameters. Literature on the subject glosses over the details, often considered as important but tedious to present. As a consequence, most implementations are flawed in one way or another. After having reviewed both the literature and the actual implementations in several programming languages and applications, we present an algorithm inspired from an exposition by Pat Sterbenz from 1974, adapted to take advantage of more recent researches in the field, which leads to a robust quadratic equation solver.
Fichier principal
Vignette du fichier
quadratics.pdf (407.38 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)
Licence
Copyright (Tous droits réservés)

Dates et versions

hal-04116310 , version 1 (03-06-2023)

Licence

Copyright (Tous droits réservés)

Identifiants

  • HAL Id : hal-04116310 , version 1

Citer

Frédéric Goualard. The Ins and Outs of Solving Quadratic Equations with Floating-Point Arithmetic. 2023. ⟨hal-04116310⟩
363 Consultations
1967 Téléchargements

Partager

More