Back to Search Start Over

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

Authors :
Goualard, Frédéric
Laboratoire des Sciences du Numérique de Nantes (LS2N)
Institut National de Recherche en Informatique et en Automatique (Inria)-Centre National de la Recherche Scientifique (CNRS)-IMT Atlantique (IMT Atlantique)
Institut Mines-Télécom [Paris] (IMT)-Institut Mines-Télécom [Paris] (IMT)-École Centrale de Nantes (Nantes Univ - ECN)
Nantes Université (Nantes Univ)-Nantes Université (Nantes Univ)-Nantes université - UFR des Sciences et des Techniques (Nantes univ - UFR ST)
Nantes Université - pôle Sciences et technologie
Nantes Université (Nantes Univ)-Nantes Université (Nantes Univ)-Nantes Université - pôle Sciences et technologie
Nantes Université (Nantes Univ)
Publication Year :
2023
Publisher :
HAL CCSD, 2023.

Abstract

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.

Details

Language :
English
Database :
OpenAIRE
Accession number :
edsair.od.......165..ac63861a7f440dd416b8eecff0588206