## I. INTRODUCTION

A recent article by Faux and Godolphin explored issues of floating-point error in
situations relevant to classical dynamics, numerical integration, cellular automata,
statistical analysis, and digital timing.^{1} Examples were given that were suitable for discussion and student project work. One of the
examples explored the properties of an algorithm, described in an IBM Knowledge Center
document designed to convert a binary field representing the number of counts of a quartz
oscillator to integers for digital display.^{2} In Ref. 1, it was demonstrated
that the algorithm was vulnerable to rounding error resulting in an incorrect digital
display. Investigation associated with this example forms the focus of this note.

The timing simulation results presented in Ref. 1 suggested that uncorrected rounding error in stopwatch timer displays could be impactful if used for precision timing, such as for race times or in experimental physics. Here, we present and analyse race times obtained from swimming competitions. The data give a clear demonstration of anomalous stopwatch timing patterns, which can only be explained by rounding error. It is also shown that such rounding error can result in a set of times being wrongly ordered. In the context of a sporting event, this could lead to the incorrect ranking of athletes and hence the incorrect awarding of race positions. As a spin-off of Ref. 1, this note may be of interest to educators, with the results providing a resource for discussion and the approach providing a template for additional student projects.

## II. A STOPWATCH TIMING ANOMALY

In many sports, including track athletics and swimming, precision timing is essential. Race
times are typically measured using digital devices and sent to display to be viewed by the
spectators. Given a large enough volume of race data, any systematic rounding error should
be identifiable from an anomalous statistical distribution of digits. Race times for track
athletes are publicly available but may not be accessible in sufficient numbers for
statistically significant conclusions to be drawn from an analysis of the frequency of
occurrence of display digits. Swimming is the ideal sport to yield high-volume data, because
a single three-hour competition typically yields 300–400 race times and these are normally
available through the MeetManager application or online.^{3}

Race times from two consecutive swimming competitions involving a total of 647
stopwatch-timed swims were analysed.^{4} The
competitions took place in a six-lane pool. Times were recorded by a timekeeper in each
lane, using personal and club stopwatches from a variety of manufacturers. The results for
the frequency of the final two displayed digits (the tenth and hundredth of a second) are
presented in Fig. 1. Particular pairs of final digits
should not be preferred to others. The results appear to be anomalous: There are three digit
pairs, namely, 00, 50, and 75, which together account for more than one eighth of the
results; conversely there are eight digit pairs with frequency zero.

A Pearson $ \chi 2 $ goodness-of-fit test was conducted on the set of 647 swim times. Under the null hypothesis that each hundredth was equally likely in each race time, the expected value of the test statistic is 99 and a test statistic exceeding 125 would indicate that the data deviated significantly from the null hypothesis. The realisation of the test statistic is 740, which exceeds the expected value under the null hypothesis by approximately 45 standard deviations, a statistically impossible outcome if each hundredth is equally likely.

Typical swimming race times for distances up to 100 m range from around 28 s to 120 s,
depending on the event and the competitor age. A computer simulation of the process of
converting a race time measurement to a digital display time (on a stopwatch in the case of
the swimming competitions) was undertaken using the procedure presented in Fig. 6 of Ref. 1 and implemented in a fortran program.^{5} Starting from a binary digit
representing (close to) 28 s, all times were processed at single tick intervals to 120 s.
This resulted in a set of 3 014 615 simulated times which were presented in the form sss.th using the standard algorithm.^{2} *Prior* to going through the display routine each tenth and hundredth digit
pair **th**, equal to 00, 01… 99 in
the time format sss.**th**,
had frequency 30 146 (±1). This is entirely consistent with the expectation that, on
average, each pair of digits should appear with a probability of 1%. However, *after* passage through the display routine some tenth and hundredth digit
pairs occurred as few as 6873 times in the simulated digital display, whilst others occurred
as many as 81606 times. Figure 2 presents the
frequencies of digit pairs **th** *after* passage through the display routine, expressed as percentages. The
oscillations exhibited in Fig. 2 are inconsistent with
each digit pair occurring with a probability of 1%, and the parallels with the real display
data in Fig. 1 are obvious.

The distribution of the **th** digit
pairs in Fig. 2 from the simulation of display times is
due to uncorrected rounding error. Likewise, rounding errors in stopwatch display software
provide the only plausible explanation for the anomalous data in Fig. 1. We have explored other datasets, and undertaken some home tests on the
same stopwatches used to produce the data in Fig. 1.
All the tests indicated statistically significant departures from the expected mean
occurrence of the tenths and hundredths digit pairs and of the hundredth digit, but the data
set presented here is the most extreme. There are obvious implications for the accuracy of
race results obtained using stopwatches.

## III. CAN ROUNDING ERROR REVERSE THE RANKING OF ATHLETES?

Any algorithm that converts an integer quartz oscillator count to a floating-point time,
and subsequently to integer digits for display, will be subject to rounding error. For the
overwhelming majority of time-display applications, this is of no consequence. However,
stopwatches are relied on for accurate timing, and Fig. 1 provides compelling evidence that they are subject to uncorrected rounding
error. Therefore, race times obtained by stopwatches, or results in laboratory physics
experiments measured by stopwatches, may be subject to rounding error, which is similar in
magnitude to the uncertainty associated with human reaction time.^{6}

Consider a sequence of times, in increasing order of duration. From Figs. 1 and 2, it is unclear
whether the process of converting such a set of times to digital display causes some time
intervals to be *stretched* and others to be *contracted*,
whilst preserving the order within the set, or whether the process can corrupt the true
order of times. We now demonstrate that rounding errors resulting from converting times to
digital display can have the consequence of corrupting the true ordering in a set of
times.

In the history of sporting events, there are many instances of very close races. For
example, recall what is arguably the most controversial race in swimming history, the 100 m
butterfly final at the 2008 Beijing Olympics. The event was won by Michael Phelps by 0.01 s
in a race that he appeared to have lost to Milorad Ĉavić.^{7} The result secured Phelps his seventh gold medal. We emphasise that
we have no evidence to suggest that timing anomalies occurred in the Phelps Ĉavić race or
even that they exist in electronic timing systems used at high-level sporting competitions,
where rounding error may be corrected. The following investigation assumes that electronic
timing systems *do not* correct for rounding error in the display
protocol.

Using the same procedure as described in Ref. 1, a
simulation was executed for times which are in the neighbourhood of, but not precisely the
same as, those of Phelps and Ĉavić. We label the two closely matched competitors as Swimmer *A* and Swimmer *B*. In Table I, we give an example of output that shows Swimmer *A* as
having a display time 0.01 s faster than that of Swimmer *B*, despite Swimmer *B* having the faster true race time by the substantial difference of
0.09 s. The true race times place Swimmer *B* as the faster swimmer, but the
digital times position Swimmer *A* ahead of Swimmer *B*. The
display improperly declares Swimmer *A* as the winner. The simulation
demonstrates a mechanism by which the ranking of two athletes correctly determined based on
the true race time can be reversed by the process of presenting to the display, if
floating-point errors are uncorrected.