Wolfram Blog
Ed Pegg Jr


September 9, 2009 — Ed Pegg Jr, Editor, Wolfram Demonstrations Project

Number 9, number 9, number 9.

The Beatles’ “Revolution 9” has the above loop, and their version of Rock Band is being released today. The movie 9 comes out today, too.

When a number has a lot of nines in it, like .99999999999999999, many computer systems can run into rounding problems. Fortunately, Mathematica can handle both exact and numeric forms. Here are exact forms of various
numbers whose numeric forms have lots of nines.

Various almost integers

Can your system figure these numbers out? Here are the Mathematica input forms for them:

Mathematica input forms for the almost integers

Numbers such as these occur in the study of almost integers. When trigonometric functions are added, then the number of nines can greatly increase. For example, 2017 21/5/π ≈ 737.50000000208, and thus sin(2017 21/5) ≈ –0.99999999999999997857. Pisot numbers can also be fantastically close to an integer.

Here are the numerical approximations for the numbers above.

1.   0.99999999999999999999999999999992878288974707564089
2.   0.99999999999999999999999999999992888272478918067295
3.   0.99999999999999999999999999999999990016495789496794
4.   110.99999996188658332
5.   0.99999996813007188185
6.   0.99999999871766046865
7.   5.9999999561918933296
8.   49.999999106159879944
9.   0.99999994563238375162

As the Beatles might say, “Take this, brother; may it serve you well…. Number 9, number 9, number 9.”

Posted in: Mathematics
Leave a Comment



This is a great post.

Posted by Dan    September 9, 2009 at 10:03 am

However, I cannot understand a word in it :_)

Posted by bdza    September 9, 2009 at 12:16 pm
Justin Grant

On a less mathematically mundane level (in other words real ‘Maat’) :

Posted by Justin Grant    September 9, 2009 at 5:09 pm
Jason Zucker

Check out the Wikipedia article on harmonic series http://en.wikipedia.org/wiki/Harmonic_series_(mathematics), section on the random harmonic series. I counted 39 “9″s. I’d love to read the AMM paper–he preprint doesn’t give the digits though.

Posted by Jason Zucker    September 10, 2009 at 8:18 am
Sander Huisman

I think you missed the best one: E^Pi-Pi !

Posted by Sander Huisman    September 10, 2009 at 12:27 pm

Ach! I remember that number 9 song! It was bizarre, number nine is the only thing that the guy says the entire time… For a while, I thought I would go mad. So, why did he do it?

Posted by IBY    September 10, 2009 at 11:21 pm

Brilliant Blog.

Two simple “procedural” contributions:

Table[N[1 - 10^-n, n], {n, 20}]

(with some mysterious rounding at n=15 and 16)


Table[StringJoin[Table["9", {n}]], {n, 10}]

Posted by Jaime    November 18, 2009 at 9:53 am

Leave a comment


Or continue as a guest (your comment will be held for moderation):