In the operations business we like to talk about nines of things, especially regarding service levels. If

- “one nine of availability” = available 0.9 of the time,
- “two nines of availability” = available 0.99 of the time,
- and so on…

then generally,

- “\(n\) nines of availability” = available \((1 - 10^{-n})\) of the time,

right?

This works for any whole number *n*: e.g. 5 nines is $$\begin{align}1 - 10^{-5} &= 1 - 0.00001 \\ &= 0.99999.\end{align}$$

There’s a problem with this simple generalisation, and that is, when people say “three and a half nines” the number they actually mean doesn’t fit the pattern. “Three and a half nines” means 0.9995, but

- \(1 - 10^{-3.5} \approx 0.9996838\), and going the other way,
- \(0.9995 \approx 1 - 10^{-3.30103}\).

We could resolve this difficulty by saying “3.3ish nines” when we mean 0.9995, or by meaning ~0.9996838 when we say “three and a half nines.” But there’s at least one function that fits the half-nines points as well!

Let’s start with the function above: $$f(n) = 1 - 10^{-n}.$$ For every odd integer, it just has to be lower by a small, correspondingly decreasing amount. We can do this by increasing the exponent of 10 by $$\begin{align}k &= 0.5 + \log_{10}(0.5) \\ &\approx 0.19897.\end{align}$$

One function for introducing a perturbation for halfodd integers is $$p(n) = \sin^2(\pi n).$$ When *n* is a whole integer, \(p(n) = 0\), and when \(n\) is half an odd integer, \(p(n) = 1\). Multiply this function by some constant and you’re in business.

Thus, define a new function \(g(n)\) for all \(n\):

$$g(n) := 1 - 10^{-n + k p(n)}$$

i.e.

$$g(n) = 1 - 10^{-n + (0.5 + \log_{10}(0.5))\sin^2(\pi n)}$$

which, when plotted, looks like this:

a negative exponential curve with a negative exponential wiggle. And it has the desired property that at every integer and half-integer it has a value with the traditional number of nines and trailing five (or not).