Track Meets and Floating Point Numbers

Here is one school’s results from a (relatively) recent track and field meet. Never mind the name of the school or the names of the athletes representing the school; this is a math blog and not a sports blog, even though I’m an avid sports fan. Furthermore, I have nothing but respect for young people who are both serious students and serious athletes. While I have no illusions about the global popularity of this blog, and while the information from the meet are in the public domain, I also have no desire to inadvertently subject these student-athletes to online abuse.

With that preamble, here are the school’s results:

The unusual score for jumps caught my attention. Clearly a score of 16\frac{1}{3} was intended, but this isn’t displayed. (This is also a lesson about using unnecessary precision… unlike the total points field showing 152.33.) Before this unusual decimal expansion, however, I should generally describe how teams are scored at a track and field meet… or at least the high school and college meets that I’ve attended in the United States.

Each meet has multiple events, often categorized as sprints, hurdles, distance races, throwing events, jumping events, relay races, and multi-sport events (like the decathlon). At each event, first place gets 10 points, second place gets 8 points, third place gets 6 points, fourth place gets 5 points, fifth place gets 4 points, sixth place gets 3 points, seventh place gets 2 points, and eighth place gets 1 point.

Let’s explain the last two lines first. At this meet, athletes from this team finished second, sixth, and seventh in the one multi-sport event, earning 8+3+2=13 points for the school. A relay team finished third in the 4×100 meter relay, earning another 6 points for the school.

The third-to-last line — jumps — requires some explanation. No athlete from the school finished in top eight in the long jump or the triple jump (0 points). One athlete won the high jump (10 points). And one athletic finished in a three-way tie for second place in the pole vault. In the case of such a tie, the points for second, third, and fourth place are averaged and given to all three competitors, for (8+6+5)/3 = 6\frac{1}{3} points. In total, the school earned 16\frac{1}{3} points from the jumping events.

In jumping events, it is possible (but rare) for athletes to tie. The table above shows the results of the competition for the top eight finishers. The lingo: P means the competitor passed at that height (to save time and energy), O means a successful attempt, and X means a failed attempt. So, the winner passed at all heights up to and including 2.70 meters, succeeded on the first attempt at 2.85, 3.00, and 3.15 meters. This athlete was the only one who cleared 3.15 meters and thus won the competition. This athlete then failed three times at 3.30 meters: each athlete has three attempts at each height; three failures at one height means elimination from the competition.

The athletes in the next three lines had the exact same performance: success at 2.70 and 2.85 meters on the first attempt, and then three straight failed attempts at 3.00 meters. Because there is nothing to distinguish the three performances, the athletes are deemed to be tied.

The athletes in fifth and sixth place also cleared 2.85 meters, but on their second attempts. Therefore, they are behind the athletes who cleared 2.85 meters on the first attempt. Furthermore, the athlete in fifth place cleared 2.70 meters on the first attempt, while the athlete in sixth place needed two attempts. Similarly, the athletes in seventh and eighth place both cleared 2.70 meters; the tiebreaker is the number of attempts needed at 2.40 meters.

Ties can also happen in elite competition as well. This dramatically happened in the men’s high jump at the 2021 Summer Olympics and the women’s pole vault at the 2023 World Championships, where the top two competitors tied and decided to share the gold medal.

By contrast, at the 2024 Olympics, the top two competitors in the men’s high jump tied but decided to continue the competition with a jumpoff until there was one winner.

My apologies to any track and field experts if my description of the scoring wasn’t quite perfect.

Back to mathematics… and back to the scores. Why did the computer think that the number of points from jumps was 16.333333492279053 and not 16\frac{1}{3} = 16.3333\dots?

There are two parts to the answer: (1) Computers store numbers in binary, and (2) they only store a finite number of binary digits.

Converting 16 into binary is easy: since 16=2^4, its representation in binary is 10000.

Converting \displaystyle \frac{1}{3} into binary is more challenging, and perhaps I’ll write a separate post on this topic. This particular fraction can be found by using the formula for an infinite geometric series:

a + ar + ar^2 + ar^3 + \dots = \displaystyle \frac{a}{1-r}

If we let a = r = \displaystyle \frac{1}{4}, then we find

\displaystyle \frac{1}{4} + \frac{1}{16} + \frac{1}{64} + \dots = \displaystyle \frac{ \frac{1}{4} } { 1 - \frac{1}{4} } = \frac{ 1/4}{3/4} = \frac{1}{3}.

Said another way,

\displaystyle \frac{1}{3} = \frac{0}{2^1} + \frac{1}{2^2} + \frac{0}{2^3} + \frac{1}{2^4} + \frac{0}{2^5} + \frac{1}{2^6} + \dots = 0.01010101\dots

Combining the two results,

\displaystyle 16\frac{1}{3} = 10000.010101010101010101010101010101\dots

This is mathematically correct; however, computers use floating-point arithmetic only store a finite number of digits to represent any number. In this case, we can reverse-engineer to figure out how many digits are stored. In this case, after some trial and error, I found that 21 digits were apparently stored after the decimal point:

\displaystyle 16\frac{1}{3} \approx 10000.010101010101010101011

This is equivalent to the sum 2^4 + \displaystyle \frac{1}{2^2} + \frac{1}{2^4} + \frac{1}{2^6} + \dots + \frac{1}{2^{20}} + \frac{1}{2^{21}}; notice that the last fraction is basically rounding up in binary. Mathematica confirms that this sum matches the sum shown in the school’s team score:

So the computer showed far too many decimal places in the “Jumps” field, and it probably should’ve been programmed to show only two decimal places, like in the “Points” field.

I close by linking to this previous post on the 1991 Gulf War, describing why a similarly small error in approximating \displaystyle \frac{1}{10} in binary tragically led to a bigger computational error that caused the death of 28 soldiers.

The Rocket Scientist Quarterbacking an Unlikely NFL Playoff Contender

I greatly enjoyed this Wall Street Journal article about Joshua Dobbs, currently the quarterback of the Minnesota Vikings. The opening paragraphs:

When quarterback Joshua Dobbs subbed in for the Minnesota Vikings last week and led them to a dramatic victory just days after they traded for him, it amazed his teammates whose names he barely knew when he stepped onto the field. 

It also left his former colleagues dumbfounded—which isn’t exactly easy to do considering they’re rocket scientists. 

“The quickness that he absorbed that playbook is astounding,” says Scott Colloredo, NASA’s Director of Engineering at Florida’s Kennedy Space Center.

Before Dobbs was a journeyman-turned-sensation for the Vikings, he majored in aerospace engineering at the University of Tennessee, where he was the rare SEC football player to take grueling science classes while also preparing to play in the NFL. Even more remarkably, Dobbs has kept up with the science while making millions of dollars in the pros: he has spent two offseasons moonlighting at NASA, where his bosses give him rave reviews and say he was just like any other engineer working on the Artemis program, except for how he made the football fans in the office giddy with excitement. 

His co-workers these days are even happier to have him in their orbit. 

How mathematicians are trying to make NFL schedules fairer

ESPN had a nice article about applied mathematicians at the University of Buffalo who are working with the NFL to create fairer schedules. A few quotes:

“This is a field I’ve worked in for 46 years, including 43 as a professor,” Karwan said by phone last week. “I’ve worked on very difficult problems that take more than 12 hours on the supercomputer to solve. And this is by far the hardest any of us have ever seen.”

And:

In developing the schedule, NFL assigns “penalty points” to outcomes such as three-game road trips, games between teams with disparate rest, and road trips following a Monday night road game. In their final proof of concept in 2017 before receiving the grant, Karwan and Steever took the 2016 schedule and lowered the penalty total by 20 percent…

The first step is based in both math and reality. Before creating the schedule, the NFL identifies a small number of games — usually between 40 and 50 — to lock in. The league refers to this as “seeding.” It helps accommodate expectations from television partners for key games in certain time slots, as well as about 200 annual requests from owners who prefer their stadiums not be used in a given week because of concerts, baseball games, marathons and other potential complications…

At that point, the NFL asks its computers to run schedule simulations until it finds one that has an acceptable penalty total. Usually that means juggling the 40 to 50 pre-seeded games. Karwan and Steever believe the key to improving the schedule is to better choose those pre-seeded games, allowing the computer to see stronger schedules that would otherwise be blocked by the initial choices through a process known as integer programming.

Not surprisingly, this research was publicized by the MIT Sloan Sports Analytics Conference, an annual conference dedicated to the integration (insert rim shot) of mathematics and sports.

Stay Focused

From Kirk Cousins, quarterback of the Washington Redskins:

Sometimes our guests ask why I have this hanging above my desk. It’s an old high school math quiz when I didn’t study at all and got a C+… just a subtle reminder to me of the importance of preparation. If I don’t prepare I get C’s!

Source: https://www.facebook.com/redskins/photos/a.118304319573.96677.102381354573/10155470824244574/?type=3&theater