Laptop Warmer Anecdote

I saw this story on the debugging section of Anecdota and thought it was funny, though I find it hard to believe.

Laptop warmer

In 1998, I made a C++ program to calculate pi to a billion digits. I coded it on my laptop (Pentium 2 I think) and then ran the program. The next day I got a new laptop but decided to keep the program running. It’s been over seven years now since I ran it. and this morning it finished calculating. The output:

“THE VALUE OF PI TO THE BILLIONTH DIGIT IS = ”

Mindblowing eh? I looked in the code of my program, and I found out that I forgot to output the value.

You would think he’d do a test run for smaller digits of PI, but I’ve done things like that.  You make a small test run. It works. You make a tiny tweak that shouldn't affect anything and then start it running because you're in a hurry.  Seven years later...

Of course, most (if not all) algorithms for calculating PI aren’t all or nothing.  Usually they start calculating digits immediately, so there ought to be immediate output as you calculate PI to further and further digits, unless this person decided to store all billion digits in a string before displaying it.

tags: , ,

What others have said

Requesting Gravatar... StevenHarman.net Sep 22, 2006 4:33 PM
# Laptop Warmer Anecdote - Debunkified?
Requesting Gravatar... AsbjornM Sep 22, 2006 9:16 PM
# re: Laptop Warmer Anecdote
Yeah, but how much memory in an computer from 98?, to store an string with an billion digits?, think not..
Requesting Gravatar... Steve Harman Sep 22, 2006 11:57 PM
# re: Laptop Warmer Anecdote
@AsbjornM, That's the same question that I asked in my response... and don't forget - this was a laptop from the late 1990's, so I'd be the hardware specs were really small.

@Phil, Do you have CoComment support turned off? Anytime I post a comment to your blog it fails to show up on my CoComment Conversations page.
Requesting Gravatar... Haacked Sep 23, 2006 4:59 AM
# re: Laptop Warmer Anecdote
Yeah, stuffing it in a string was supposed to be a joke. As Steve points out, it would take too much memory.
Requesting Gravatar... Albert Pascual Sep 25, 2006 7:30 AM
# re: Laptop Warmer Anecdote
Can you post the code?
Requesting Gravatar... Haacked Sep 25, 2006 9:26 AM
# re: Laptop Warmer Anecdote
I don't have the code. I was merely linking to a story in another forum.
Requesting Gravatar... Jason Bock Sep 25, 2006 12:29 PM
# re: Laptop Warmer Anecdote
Here's a site that shows an algorithm that lets you calculate the nth digit of PI without having to calculate any of the previous digits:

http://crd.lbl.gov/~dhbailey/

It's called the BBP formula. More links on the formula can be found on Bailey's site.

What do you have to say?

(will show your gravatar)
Please add 1 and 1 and type the answer here: