Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Quantifying Dinosaur Pee - Expressing Probabilities as Floating-Point Values in C++ - Lecture

CppCon via YouTube

Overview

Explore a lighthearted yet mathematically rigorous conference talk that delves into the intricacies of expressing probabilities as floating-point values in C++. Begin with a brief review of the birthday problem to illustrate potential numerical pitfalls in floating-point expressions. Then, tackle four humorous questions about the proportion of water on Earth that may have once been inside a dinosaur, using various scientific assumptions and mathematical approaches. Discover how to overcome representational barriers in floating-point calculations, especially when dealing with very low or high probabilities. Gain insights into the subtle differences between probability and expected value, and learn practical techniques for improving numerical precision in C++ programming.

Syllabus

Introduction
The Birthday Problem
Boundary Conditions
Birthday Function
Unique Birthday
Observations
Recap
Dinosaur Pee
Expected Value
Geometric Sum Formula
Sum a finite or infinite series
Plugging in inquiry symbols
Alternative facts and quotes
Timescale
Bird Model
Daily Rate
Compounding
Time Scales
Plugging in Numbers
The Result
Example
FloatingPoint Subtraction Algorithm
Summary
Discrete Probability
Lightning Speed
Precision
ExpectedValue
Symmetry
Distribution
Takeaways
Delirium
Dinosaur Steak
Questions

Taught by

CppCon

Reviews

Start your review of Quantifying Dinosaur Pee - Expressing Probabilities as Floating-Point Values in C++ - Lecture

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.