Lightning Talk: Finding the Average of 2 Integers - Tomer Vromen - CppCon 2022
https://github.com/CppCon/CppCon2022
I'm going to discuss the (a+b)/2 problem - not the midpoint problem (for which Marshal is an expert) but rather the one with a possibly fractional result. It will be a quick taste of the limits of using floating points to represent integers.
---
Tomer Vromen
__
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk
Quantifying Dinosaur Pee - Expressing Probabilities as Floating-Point Values in Cpp - John Lakos - CppCon 2022
https://github.com/CppCon/CppCon2022
Like most cppcon.digital-medium.co.uk/tag/programming/">programming languages, C++ can be used effectively for numerical calculations. Some expressions, especially those involving very low or very high probabilities, can be problematic. In particular, floating-point expressions — even those of type long double — can present representational barriers when crafted unartfully. In this lighthearted yet mathematically and computationally informative talk, we’ll begin by briefly reprising the birthday problem and, to elucidate a subtle potential numerical pitfall, together attempt to design a corresponding function that, given a non-negative integer (number of persons), returns a probability (i.e., between 0.0 and 1.0, inclusive).
We’ll then turn to the main topic of this talk, which is to answer — once and for all — four of humankind’s most pressing questions pertaining to the proportion of water on this planet that, at one time, might have been inside a dinosaur. The correct answer to each of these questions will turn out to be one of five possibilities: (a) 0, (b) almost 0, (c) in the middle, (d) almost 1, and (e) 1. The audience will be asked to predict these answers up front. We’ll then proceed to verify these answers using a variety of scientific assumptions and mathematical approaches that all lead to the same conclusions. Along the way, we’ll identify the same subtle, numerical pitfall with floating-point representations that we encountered with the birthday problem and, perhaps, even crispen our understanding of probability versus expected value.
---
John Lakos
John Lakos, author of Large-Scale C++ Software Design (Pearson, 1997), serves at Bloomberg LP in New York City as a senior architect and mentor for C++ Software Development world-wide. He is also an active voting member of the C++ Standards Committee’s Evolution Working Group. Previously, Dr. Lakos directed the design and development of infrastructure libraries for proprietary analytical financial applications at Bear Stearns. For 12 years prior, Dr. Lakos developed large frameworks and advanced ICCAD applications at Mentor Graphics, for which he holds multiple software patents. His academic credentials include a Ph.D. in Computer Science ('97) and an Sc.D. in Electrical Engineering ('89) from Columbia University. Dr. Lakos received his undergraduate degrees from MIT in Mathematics ('82) and Computer Science ('81). He is the author of the multi-volume book Large-Scale C++, the first volume of which, Volume I: Process and Architecture (Pearson, 2020), is currently available, and subsequent volumes are forthcoming. He is the coauthor of Embracing Modern C++ Safely (Pearson, 2021) along with Vittorio Romeo, Rostislav Khlebnikov, and Alisdair Meredith.
---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk