Please rotate your tablet to be horizontal.

You can dismiss this notice but please note that this experience has not been designed for mobile devices and so will be less than optimal

Back To Schedule

Quantifying Dinosaur Pee

Expressing Probabilities as Floating-Point Values

10:30 - 11:30 Friday 16th September 2022 MDT Summit 8 & 9 / Online C
Beginner
Intermediate
Advanced
Expert
Math & Numbers

Like most 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

Bloomberg LP

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.