English

An Improved Algorithm for hypot(a,b)

Numerical Analysis 2019-06-17 v6 Numerical Analysis

Abstract

We develop a fast and accurate algorithm for evaluating a2+b2\sqrt{a^2+b^2} for two floating point numbers aa and bb. Library functions that perform this computation are generally named {\tt hypot(a,b)}. We will compare four approaches that we will develop in this paper to the current resident library function that is delivered with Julia 1.1 and to the code that has been distributed with the C math library for decades. We will demonstrate the performance of our algorithms by simulation.

Cite

@article{arxiv.1904.09481,
  title  = {An Improved Algorithm for hypot(a,b)},
  author = {Carlos F. Borges},
  journal= {arXiv preprint arXiv:1904.09481},
  year   = {2019}
}
R2 v1 2026-06-23T08:45:24.734Z