Loading…
CppCon 2025 has ended
Tuesday September 16, 2025 14:00 - 15:00 MDT
Floating-point arithmetic is easy to write. But, when it goes wrong, it is much harder to debug. It's even harder to define what "wrong" means: a game has to be fast, but a financial report has to be reasonable for humans. This talk explores how different applications impose implicit requirements on floating-point behavior, what classical issues arise, how to work with them, and why there is sometimes no workaround.

We will start by looking at how floating-point operations are implemented in different C++ contexts, and the counter-intuitive implications that follow. We will see how different environments find subtly different balances between correctness, predictability, and performance. We will then examine code examples that produce subtly incorrect results or even UB, but are still easily fixable.

Next, we will dive into more complicated calculations and understand where we are restricted or helped by IEEE-754, C++, and computational mathematics. The talk will conclude with practical recommendations: how to define realistic expectations, how to test and structure your code, and how libraries can and/or cannot help you.

If you've ever been surprised by floating-point behavior in C++, this talk will tell you what's going on.

Presenters
ES

Egor Suvorov

Senior Software Engineer, Bloomberg
Egor Suvorov is a senior software engineer at Bloomberg, where he works on DataLayer, the company's real-time streaming data transformation pipeline. Previously, he led a freshman C++ course, where his students uncovered and reported dozens of bugs in various C++ tools. Egor was also... Read More →
Tuesday September 16, 2025 14:00 - 15:00 MDT
Summit 2/3

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Share Modal

Share this link via

Or copy link