How accurate we are? A refresher on the floating-point arithmetic and the standard library.

Speaker: Boguslaw Cyganek

Audience level: Beginner | Intermediate | Advanced

Computers are about computations and every day we do additions, multiplications, etc. using the ubiquitous floating-point (FP) representation. I do computations for years and sometimes I’m surprised by some of the results. Not only because my ideas do not work as expected, but sometimes because I was not careful enough to choose the best algorithm or to protect some computation steps. Because of these I prepared a number of FP recipes for myself and my students which I will present.

In my talk I’ll present the basics of FP representation and how to avoid some pitfalls such as under- and overflow, the catastrophic cancellations, and how the NaN can pop up. I’ll also talk if the std::accumulate is good for all accumulations and what can we gain launching std::transform_reduce with the std::execution::par? Then, what are the most accurate and the fastest summation methods and how easy it is to use them in our code. I’ll also touch on such topics as accurate computation of the inner product of vectors and the fast matrix multiplication. Everybody is welcome.

std::cout << std::string( "Come to my talk " )

              + ( 0.1+0.2==0.3 ? "absolutely" : "& U R welcome" );